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