feat: type adjustmets
This commit is contained in:
parent
a146386e68
commit
ec9bb69f98
3 changed files with 3 additions and 7 deletions
|
@ -93,7 +93,7 @@ pub struct AddRepository<'a> {
|
||||||
/// html link to the repository
|
/// html link to the repository
|
||||||
pub html_link: &'a str,
|
pub html_link: &'a str,
|
||||||
/// repository topic tags
|
/// repository topic tags
|
||||||
pub tags: Option<Vec<String>>,
|
pub tags: Option<Vec<&'a str>>,
|
||||||
/// hostname of the forge instance: with scheme but remove trailing slash
|
/// hostname of the forge instance: with scheme but remove trailing slash
|
||||||
/// hostname can be derived from html_link also, but used to link to user's forge instance
|
/// hostname can be derived from html_link also, but used to link to user's forge instance
|
||||||
pub hostname: &'a str,
|
pub hostname: &'a str,
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
use db_core::dev::*;
|
use db_core::dev::*;
|
||||||
use std::str::FromStr;
|
|
||||||
|
|
||||||
use sqlx::sqlite::SqlitePool;
|
use sqlx::sqlite::SqlitePool;
|
||||||
use sqlx::sqlite::SqlitePoolOptions;
|
use sqlx::sqlite::SqlitePoolOptions;
|
||||||
|
@ -159,7 +158,7 @@ impl SCDatabase for Database {
|
||||||
{
|
{
|
||||||
Ok(_) => Ok(true),
|
Ok(_) => Ok(true),
|
||||||
Err(Error::RowNotFound) => Ok(false),
|
Err(Error::RowNotFound) => Ok(false),
|
||||||
Err(e) => Err(DBError::DBError(Box::new(e)).into()),
|
Err(e) => Err(DBError::DBError(Box::new(e))),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::rc::Rc;
|
|
||||||
|
|
||||||
use sqlx::sqlite::SqlitePoolOptions;
|
use sqlx::sqlite::SqlitePoolOptions;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
@ -63,12 +62,10 @@ async fn everything_works() {
|
||||||
let connection_options = ConnectionOptions::Fresh(Fresh { pool_options, url });
|
let connection_options = ConnectionOptions::Fresh(Fresh { pool_options, url });
|
||||||
let db = connection_options.connect().await.unwrap();
|
let db = connection_options.connect().await.unwrap();
|
||||||
|
|
||||||
let tags = TAGS.iter().map(|s| s.to_string()).collect();
|
|
||||||
|
|
||||||
let add_repo_msg = AddRepository {
|
let add_repo_msg = AddRepository {
|
||||||
html_link: HTML_REPO_URL,
|
html_link: HTML_REPO_URL,
|
||||||
name: REPO_NAME,
|
name: REPO_NAME,
|
||||||
tags: Some(tags),
|
tags: Some(TAGS.into()),
|
||||||
owner: USERNAME,
|
owner: USERNAME,
|
||||||
website: None,
|
website: None,
|
||||||
description: None,
|
description: None,
|
||||||
|
|
Loading…
Reference in a new issue