MCPcopy Create free account
hub / github.com/emwalker/digraph / link_searches

Method link_searches

backend/src/git/client.rs:297–313  ·  view source on GitHub ↗
(&self, link: Option<RepoLink>)

Source from the content-addressed store, hash-verified

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)?;

Callers 2

remove_linkMethod · 0.80
save_linkMethod · 0.80

Calls 4

parseFunction · 0.85
is_referenceMethod · 0.80
urlMethod · 0.45
titleMethod · 0.45

Tested by

no test coverage detected