diff options
author | Aleksey Kladov <[email protected]> | 2020-04-25 20:04:04 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-04-25 20:22:40 +0100 |
commit | bd9ede0ec9fb76c8cc0b572ef0405811e1cb666e (patch) | |
tree | 723ee0cd16b656a8db5c65ac65b16cc841608126 /crates/ra_arena | |
parent | 0f099ead8893fa9551e385b030a4239ea1338451 (diff) |
Extract messy tree handling out of profiling code
Diffstat (limited to 'crates/ra_arena')
-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() |