(&self, link: Option<RepoLink>)
| 295 | } |
| 296 | |
| 297 | fn link_searches(&self, link: Option<RepoLink>) -> Result<BTreeSet<Search>> { |
| 298 | let searches = match link { |
| 299 | Some(link) => { |
| 300 | if link.is_reference() { |
| 301 | return Ok(BTreeSet::new()); |
| 302 | } |
| 303 | |
| 304 | let url = RepoUrl::parse(link.url())?; |
| 305 | BTreeSet::from([ |
| 306 | Search::parse(link.title())?, |
| 307 | Search::parse(&url.normalized)?, |
| 308 | ]) |
| 309 | } |
| 310 | None => BTreeSet::new(), |
| 311 | }; |
| 312 | Ok(searches) |
| 313 | } |
| 314 | |
| 315 | pub fn topic_path(&self, repo_id: RepoId, topic_id: &ExternalId) -> Result<Option<TopicPath>> { |
| 316 | let topic_oid = self.repo(repo_id)?.topic_oid(&self.timespec, topic_id)?; |
no test coverage detected