From d4c8310d059e76f28c81e1e404dfe79b982bc23b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 8 Jan 2019 15:53:32 +0300 Subject: switch interner to use arena --- 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 040977dc4..43bfa925a 100644 --- a/crates/ra_arena/src/lib.rs +++ b/crates/ra_arena/src/lib.rs @@ -61,6 +61,9 @@ pub trait ArenaId { } impl Arena { + pub fn len(&self) -> usize { + self.data.len() + } pub fn alloc(&mut self, value: T) -> ID { let id = RawId(self.data.len() as u32); self.data.push(value); -- cgit v1.2.3