aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_arena/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_arena/src')
-rw-r--r--crates/ra_arena/src/lib.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_arena/src/lib.rs b/crates/ra_arena/src/lib.rs
index 69b5f10e0..26641e690 100644
--- a/crates/ra_arena/src/lib.rs
+++ b/crates/ra_arena/src/lib.rs
@@ -71,6 +71,9 @@ impl<ID: ArenaId, T> Arena<ID, T> {
71 pub fn len(&self) -> usize { 71 pub fn len(&self) -> usize {
72 self.data.len() 72 self.data.len()
73 } 73 }
74 pub fn is_empty(&self) -> bool {
75 self.data.is_empty()
76 }
74 pub fn alloc(&mut self, value: T) -> ID { 77 pub fn alloc(&mut self, value: T) -> ID {
75 let id = RawId(self.data.len() as u32); 78 let id = RawId(self.data.len() as u32);
76 self.data.push(value); 79 self.data.push(value);