MCPcopy Index your code
hub / github.com/emwalker/digraph / remove_topic

Method remove_topic

backend/src/git/client.rs:568–595  ·  view source on GitHub ↗
(
        &mut self,
        repo_id: RepoId,
        topic_id: &ExternalId,
        topic: &RepoTopic,
    )

Source from the content-addressed store, hash-verified

566 }
567
568 pub fn remove_topic(
569 &mut self,
570 repo_id: RepoId,
571 topic_id: &ExternalId,
572 topic: &RepoTopic,
573 ) -> Result<()> {
574 self.check_can_update(repo_id)?;
575
576 self.indexer
577 .remove_synonyms(&self.client, repo_id, topic_id, topic)?;
578
579 let meta = &topic.metadata;
580 let mut searches = vec![];
581 for synonym in meta.synonyms() {
582 let search = Search::parse(&synonym.name)?;
583 if search.is_empty() {
584 continue;
585 }
586 searches.push(search);
587 }
588
589 let entry = topic.to_search_entry();
590 self.indexer
591 .remove_searches(&self.client, repo_id, &entry, searches.iter())?;
592 self.remove(repo_id, topic_id)?;
593
594 Ok(())
595 }
596
597 pub fn repo(&self, repo_id: RepoId) -> Result<core::Repo> {
598 self.client.repo(repo_id)

Callers 1

callMethod · 0.80

Calls 9

parseFunction · 0.85
check_can_updateMethod · 0.80
remove_synonymsMethod · 0.80
to_search_entryMethod · 0.80
remove_searchesMethod · 0.80
synonymsMethod · 0.45
is_emptyMethod · 0.45
iterMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected