(&self, h: &Hash)
| 20 | } |
| 21 | |
| 22 | fn object_path(&self, h: &Hash) -> PathBuf { |
| 23 | let hex = h.to_hex(); |
| 24 | let (pre, suf) = hex.split_at(2); |
| 25 | let mut path = self.base.clone(); |
| 26 | path.extend([pre, suf]); |
| 27 | path |
| 28 | } |
| 29 | |
| 30 | #[tracing::instrument(level = "trace", skip(self))] |
| 31 | pub async fn get(&self, key: &Hash) -> io::Result<Option<Box<[u8]>>> { |