(&mut self, trunk: &Trunk)
| 386 | type Error = crate::pristine::PristineError; |
| 387 | |
| 388 | fn put_trunk(&mut self, trunk: &Trunk) -> Result<bool, Self::Error> { |
| 389 | let is_new = !self.trunks.contains_key(&trunk.id()); |
| 390 | self.trunks.insert(trunk.id(), trunk.clone()); |
| 391 | self.path_index.insert(trunk.path().to_string(), trunk.id()); |
| 392 | self.inode_index.insert(trunk.inode(), trunk.id()); |
| 393 | Ok(is_new) |
| 394 | } |
| 395 | |
| 396 | fn get_trunk(&self, id: TrunkId) -> Result<Option<Trunk>, Self::Error> { |
| 397 | Ok(self.trunks.get(&id).cloned()) |
no test coverage detected