chore: fix types for easy use with bin

This commit is contained in:
Aravinth Manivannan 2022-05-04 22:35:23 +05:30
parent 21c93a5e4e
commit 6355835135
Signed by: realaravinth
GPG key ID: AD9F0F08E855ED88
2 changed files with 4 additions and 2 deletions

View file

@ -93,7 +93,7 @@ pub struct AddRepository<'a> {
/// html link to the repository
pub html_link: &'a str,
/// repository topic tags
pub tags: Option<Vec<&'a str>>,
pub tags: Option<Vec<String>>,
/// 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,

View file

@ -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,