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

Method remove

backend/src/git/index.rs:232–243  ·  view source on GitHub ↗
(&mut self, id: &ExternalId, phrase: Phrase, name: &str)

Source from the content-addressed store, hash-verified

230 }
231
232 pub fn remove(&mut self, id: &ExternalId, phrase: Phrase, name: &str) -> Result<()> {
233 if let Some(paths) = self.index.synonyms.get_mut(&phrase) {
234 paths.remove(&SynonymEntry {
235 name: name.to_owned(),
236 id: id.to_owned(),
237 });
238 if paths.is_empty() {
239 self.index.synonyms.remove(&phrase);
240 }
241 }
242 Ok(())
243 }
244
245 pub fn prefix_matches(&self, token: &Phrase) -> BTreeSet<SynonymEntry> {
246 self.index.prefix_matches(token)

Callers 8

callMethod · 0.45
callMethod · 0.45
mark_deletedMethod · 0.45
remove_searchesMethod · 0.45
remove_synonymsMethod · 0.45
updateMethod · 0.45
update_synonymsMethod · 0.45
writeMethod · 0.45

Calls 2

get_mutMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected