From bd9ede0ec9fb76c8cc0b572ef0405811e1cb666e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 25 Apr 2020 21:04:04 +0200 Subject: Extract messy tree handling out of profiling code --- crates/ra_arena/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/ra_arena') 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 Arena { pub const fn new() -> Arena { Arena { data: Vec::new() } } + pub fn clear(&mut self) { + self.data.clear(); + } pub fn len(&self) -> usize { self.data.len() -- cgit v1.2.3