diff options
Diffstat (limited to 'crates/ra_arena/src/lib.rs')
-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 ea98d5444..441fbb3cb 100644 --- a/crates/ra_arena/src/lib.rs +++ b/crates/ra_arena/src/lib.rs | |||
@@ -96,6 +96,9 @@ impl<T> Arena<T> { | |||
96 | pub const fn new() -> Arena<T> { | 96 | pub const fn new() -> Arena<T> { |
97 | Arena { data: Vec::new() } | 97 | Arena { data: Vec::new() } |
98 | } | 98 | } |
99 | pub fn clear(&mut self) { | ||
100 | self.data.clear(); | ||
101 | } | ||
99 | 102 | ||
100 | pub fn len(&self) -> usize { | 103 | pub fn len(&self) -> usize { |
101 | self.data.len() | 104 | self.data.len() |