(title: &str, url: &str)
| 39 | } |
| 40 | |
| 41 | pub fn link(title: &str, url: &str) -> RepoLink { |
| 42 | let added = chrono::Utc::now(); |
| 43 | RepoLink { |
| 44 | api_version: API_VERSION.to_owned(), |
| 45 | metadata: RepoLinkMetadata { |
| 46 | id: "00002".try_into().unwrap(), |
| 47 | added, |
| 48 | details: Some(RepoLinkDetails { |
| 49 | title: title.to_owned(), |
| 50 | url: url.to_owned(), |
| 51 | }), |
| 52 | }, |
| 53 | parent_topics: BTreeSet::from([ParentTopic { |
| 54 | id: "00001".try_into().expect("failed to parse id"), |
| 55 | }]), |
| 56 | } |
| 57 | } |
no test coverage detected