Method
add_alias
(&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:") { |
Tested by
no test coverage detected