We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c397252 commit f633f69Copy full SHA for f633f69
crates/ra_arena/src/map.rs
@@ -14,9 +14,6 @@ pub struct ArenaMap<ID, V> {
14
impl<T, V> ArenaMap<Idx<T>, V> {
15
pub fn insert(&mut self, id: Idx<T>, t: V) {
16
let idx = Self::to_idx(id);
17
- if self.v.capacity() <= idx {
18
- self.v.reserve(idx + 1 - self.v.capacity());
19
- }
20
21
let fill = (idx + 1).saturating_sub(self.v.len());
22
self.v.extend(std::iter::repeat_with(|| None).take(fill));
0 commit comments