diff --git a/costs/src/storage_cost/removal.rs b/costs/src/storage_cost/removal.rs index 1ef9d28b..9fa7af99 100644 --- a/costs/src/storage_cost/removal.rs +++ b/costs/src/storage_cost/removal.rs @@ -49,8 +49,7 @@ pub const UNKNOWN_EPOCH: u64 = u64::MAX; pub type StorageRemovalPerEpochByIdentifier = BTreeMap>; /// Removal bytes -#[derive(Debug, PartialEq, Clone, Eq)] -#[derive(Default)] +#[derive(Debug, PartialEq, Clone, Eq, Default)] pub enum StorageRemovedBytes { /// No storage removal #[default] @@ -61,8 +60,6 @@ pub enum StorageRemovedBytes { SectionedStorageRemoval(StorageRemovalPerEpochByIdentifier), } - - impl Add for StorageRemovedBytes { type Output = Self; diff --git a/grovedb/src/batch/estimated_costs/average_case_costs.rs b/grovedb/src/batch/estimated_costs/average_case_costs.rs index c8f99eeb..0a8d573d 100644 --- a/grovedb/src/batch/estimated_costs/average_case_costs.rs +++ b/grovedb/src/batch/estimated_costs/average_case_costs.rs @@ -211,7 +211,9 @@ impl TreeCache for AverageCaseTreeCacheKnownPaths { &cost, self.paths.get(path).ok_or_else(|| { let paths = self - .paths.keys().map(|k| k.0.iter().map(|k| hex::encode(k.as_slice())).join("/")) + .paths + .keys() + .map(|k| k.0.iter().map(|k| hex::encode(k.as_slice())).join("/")) .join(" | "); Error::PathNotFoundInCacheForEstimatedCosts(format!( "required path {} not found in paths {}", @@ -231,7 +233,9 @@ impl TreeCache for AverageCaseTreeCacheKnownPaths { &cost, self.paths.get(path).ok_or_else(|| { let paths = self - .paths.keys().map(|k| k.0.iter().map(|k| hex::encode(k.as_slice())).join("/")) + .paths + .keys() + .map(|k| k.0.iter().map(|k| hex::encode(k.as_slice())).join("/")) .join(" | "); Error::PathNotFoundInCacheForEstimatedCosts(format!( "required path for estimated merk caching {} not found in paths {}", diff --git a/merk/src/estimated_costs/average_case_costs.rs b/merk/src/estimated_costs/average_case_costs.rs index 93c51847..b92222ac 100644 --- a/merk/src/estimated_costs/average_case_costs.rs +++ b/merk/src/estimated_costs/average_case_costs.rs @@ -74,8 +74,6 @@ pub enum EstimatedSumTrees { } #[cfg(feature = "full")] - - #[cfg(feature = "full")] impl EstimatedSumTrees { fn estimated_size(&self) -> Result { diff --git a/merk/src/merk/mod.rs b/merk/src/merk/mod.rs index 17c7aa7e..93c052a4 100644 --- a/merk/src/merk/mod.rs +++ b/merk/src/merk/mod.rs @@ -871,10 +871,7 @@ mod test { #[test] fn reopen_iter() { - fn collect( - iter: PrefixedStorageIter<'_, '_>, - nodes: &mut Vec<(Vec, Vec)>, - ) { + fn collect(iter: PrefixedStorageIter<'_, '_>, nodes: &mut Vec<(Vec, Vec)>) { while iter.valid().unwrap() { nodes.push(( iter.key().unwrap().unwrap().to_vec(),