diff --git a/src/common/estimate_size/src/collections/vec.rs b/src/common/estimate_size/src/collections/vec.rs index 6064cbfbfe3a6..ac9f766ee1ec6 100644 --- a/src/common/estimate_size/src/collections/vec.rs +++ b/src/common/estimate_size/src/collections/vec.rs @@ -17,21 +17,21 @@ use crate::EstimateSize; #[derive(Clone)] pub struct EstimatedVec { inner: Vec, - kv_heap_size: usize, + heap_size: usize, } impl Default for EstimatedVec { fn default() -> Self { Self { inner: vec![], - kv_heap_size: 0, + heap_size: 0, } } } impl EstimateSize for EstimatedVec { fn estimated_heap_size(&self) -> usize { - self.kv_heap_size + self.heap_size } } @@ -41,9 +41,7 @@ impl EstimatedVec { } pub fn push(&mut self, value: T) { - self.kv_heap_size = self - .kv_heap_size - .saturating_add(value.estimated_heap_size()); + self.heap_size = self.heap_size.saturating_add(value.estimated_heap_size()); self.inner.push(value); }