diff --git a/crates/ra_arena/src/map.rs b/crates/ra_arena/src/map.rs index b9521c342e..e4ddbad429 100644 --- a/crates/ra_arena/src/map.rs +++ b/crates/ra_arena/src/map.rs @@ -14,9 +14,6 @@ pub struct ArenaMap { impl ArenaMap, V> { pub fn insert(&mut self, id: Idx, t: V) { let idx = Self::to_idx(id); - if self.v.capacity() <= idx { - self.v.reserve(idx + 1 - self.v.capacity()); - } let fill = (idx + 1).saturating_sub(self.v.len()); self.v.extend(std::iter::repeat_with(|| None).take(fill));