From 4251f083b551de9bfe15d11bb4b485c0a5de86ab Mon Sep 17 00:00:00 2001 From: kjeremy Date: Fri, 26 Apr 2019 11:42:10 -0400 Subject: Add is_empty to 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 69b5f10e0..26641e690 100644 --- a/crates/ra_arena/src/lib.rs +++ b/crates/ra_arena/src/lib.rs @@ -71,6 +71,9 @@ impl Arena { pub fn len(&self) -> usize { self.data.len() } + pub fn is_empty(&self) -> bool { + self.data.is_empty() + } pub fn alloc(&mut self, value: T) -> ID { let id = RawId(self.data.len() as u32); self.data.push(value); -- cgit v1.2.3