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

Method add

backend/src/git/ext.rs:137–153  ·  view source on GitHub ↗
(&mut self, key: Okey, repo_id: RepoId, repo_obj: RepoObject)

Source from the content-addressed store, hash-verified

135 }
136
137 pub fn add(&mut self, key: Okey, repo_id: RepoId, repo_obj: RepoObject) {
138 let builder = self
139 .0
140 .entry(key.to_owned())
141 .or_insert_with(|| match repo_obj {
142 RepoObject::Link(_) => ObjectBuilder::Link {
143 key,
144 map: Map::new(),
145 },
146 RepoObject::Topic(_) => ObjectBuilder::Topic {
147 key,
148 map: Map::new(),
149 },
150 });
151
152 builder.insert(repo_id, repo_obj);
153 }
154
155 pub fn finalize(self) -> Result<Objects> {
156 let mut map = HashMap::new();

Callers 5

fetch_allMethod · 0.45
writeMethod · 0.45
fetch_matchesMethod · 0.45
fetch_downsetMethod · 0.45
SearchBoxFunction · 0.45

Calls 1

insertMethod · 0.80

Tested by

no test coverage detected