diff --git a/crates/oxc_index/src/lib.rs b/crates/oxc_index/src/lib.rs index 1b2892b4abf98..36025b91907e0 100644 --- a/crates/oxc_index/src/lib.rs +++ b/crates/oxc_index/src/lib.rs @@ -371,6 +371,12 @@ impl IndexVec { self.raw.shrink_to_fit(); } + /// Shrinks the capacity of the vector with a lower bound. + #[inline] + pub fn shrink_to(&mut self, min_capacity: usize) { + self.raw.shrink_to(min_capacity); + } + /// Shortens the vector, keeping the first `len` elements and dropping /// the rest. See [`Vec::truncate`] #[inline]