Add is_empty to Arena
@@ -71,6 +71,9 @@ impl<ID: ArenaId, T> Arena<ID, T> {
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);
