MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / add_alias

Method add_alias

atomic-repository/src/repository/vault_projection.rs:172–181  ·  view source on GitHub ↗
(&mut self, alias: String, target: (String, C))

Source from the content-addressed store, hash-verified

170 }
171
172 fn add_alias(&mut self, alias: String, target: (String, C)) {
173 self.aliases
174 .entry(alias.to_lowercase())
175 .and_modify(|existing| {
176 if existing.as_ref() != Some(&target) {
177 *existing = None;
178 }
179 })
180 .or_insert(Some(target));
181 }
182
183 fn resolve(&self, raw: &str) -> Option<(String, C)> {
184 if raw.starts_with("memory:") || raw.starts_with("intent:") {

Callers 1

newMethod · 0.80

Calls 1

as_refMethod · 0.80

Tested by

no test coverage detected