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

Method from

backend/src/git/activity.rs:20–27  ·  view source on GitHub ↗
(synonyms: &Vec<Synonym>)

Source from the content-addressed store, hash-verified

18
19impl From<&Vec<Synonym>> for SynonymList {
20 fn from(synonyms: &Vec<Synonym>) -> Self {
21 let mut map = BTreeMap::new();
22 for synonym in synonyms {
23 map.entry(synonym.locale)
24 .or_insert_with(|| synonym.name.to_owned());
25 }
26 Self(map)
27 }
28}
29
30impl From<&HashSet<(String, Locale)>> for SynonymList {

Callers

nothing calls this directly

Calls 7

insertMethod · 0.80
SynonymListClass · 0.70
synonymsMethod · 0.45
topic_idMethod · 0.45
idMethod · 0.45
titleMethod · 0.45
urlMethod · 0.45

Tested by

no test coverage detected