From 635583513586090c39e218b528be1f66d4cefbdb Mon Sep 17 00:00:00 2001 From: realaravinth Date: Wed, 4 May 2022 22:35:23 +0530 Subject: [PATCH] chore: fix types for easy use with bin --- db/db-core/src/lib.rs | 2 +- db/db-sqlx-sqlite/src/tests.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/db/db-core/src/lib.rs b/db/db-core/src/lib.rs index 2d6ef51..0d02ba0 100644 --- a/db/db-core/src/lib.rs +++ b/db/db-core/src/lib.rs @@ -93,7 +93,7 @@ pub struct AddRepository<'a> { /// html link to the repository pub html_link: &'a str, /// repository topic tags - pub tags: Option>, + pub tags: Option>, /// 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 pub hostname: &'a str, diff --git a/db/db-sqlx-sqlite/src/tests.rs b/db/db-sqlx-sqlite/src/tests.rs index 454dadf..b9eccb6 100644 --- a/db/db-sqlx-sqlite/src/tests.rs +++ b/db/db-sqlx-sqlite/src/tests.rs @@ -63,10 +63,12 @@ async fn everything_works() { let connection_options = ConnectionOptions::Fresh(Fresh { pool_options, url }); let db = connection_options.connect().await.unwrap(); + let tags = TAGS.iter().map(|s| s.to_string()).collect(); + let add_repo_msg = AddRepository { html_link: HTML_REPO_URL, name: REPO_NAME, - tags: Some(TAGS.into()), + tags: Some(tags), owner: USERNAME, website: None, description: None,