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

Method name

backend/src/git/types.rs:275–289  ·  view source on GitHub ↗
(&self, locale: Locale)

Source from the content-addressed store, hash-verified

273
274impl RepoTopicMetadata {
275 pub fn name(&self, locale: Locale) -> &str {
276 let synonyms = self.synonyms();
277
278 for synonym in synonyms.iter() {
279 if synonym.locale == locale {
280 return &synonym.name;
281 }
282 }
283
284 if let Some(synonym) = synonyms.first() {
285 return &synonym.name;
286 }
287
288 "[missing name]"
289 }
290
291 pub fn synonyms(&self) -> &[Synonym] {
292 match &self.details {

Callers 2

display_nameMethod · 0.45
statsMethod · 0.45

Calls 4

formatMethod · 0.80
synonymsMethod · 0.45
iterMethod · 0.45
prefixMethod · 0.45

Tested by

no test coverage detected