diff options
Diffstat (limited to 'crates/ra_arena/src')
-rw-r--r-- | crates/ra_arena/src/lib.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_arena/src/lib.rs b/crates/ra_arena/src/lib.rs index 441fbb3cb..3169aa5b8 100644 --- a/crates/ra_arena/src/lib.rs +++ b/crates/ra_arena/src/lib.rs | |||
@@ -116,6 +116,9 @@ impl<T> Arena<T> { | |||
116 | ) -> impl Iterator<Item = (Idx<T>, &T)> + ExactSizeIterator + DoubleEndedIterator { | 116 | ) -> impl Iterator<Item = (Idx<T>, &T)> + ExactSizeIterator + DoubleEndedIterator { |
117 | self.data.iter().enumerate().map(|(idx, value)| (Idx::from_raw(RawId(idx as u32)), value)) | 117 | self.data.iter().enumerate().map(|(idx, value)| (Idx::from_raw(RawId(idx as u32)), value)) |
118 | } | 118 | } |
119 | pub fn shrink_to_fit(&mut self) { | ||
120 | self.data.shrink_to_fit(); | ||
121 | } | ||
119 | } | 122 | } |
120 | 123 | ||
121 | impl<T> Default for Arena<T> { | 124 | impl<T> Default for Arena<T> { |