(&mut self, old_path: &Rc<Path>, new_path: &Rc<Path>)
| 35 | } |
| 36 | |
| 37 | pub fn rename(&mut self, old_path: &Rc<Path>, new_path: &Rc<Path>) { |
| 38 | if let Some(value) = self.value_map.remove(old_path) { |
| 39 | self.value_map.insert(new_path.clone(), value); |
| 40 | } else { |
| 41 | self.value_map.remove(new_path); |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | pub fn duplicate(&mut self, old_path: &Rc<Path>, new_path: &Rc<Path>) { |
| 46 | if let Some(value) = self.value_map.get(old_path).copied() { |
no test coverage detected