add is_empty
This commit is contained in:
parent
b9bfc07146
commit
f24ec04340
|
@ -289,6 +289,10 @@ impl Tree {
|
|||
pub fn root_node(&self) -> Result<IndexedNode, Error> {
|
||||
self.resolve_link(self.root)
|
||||
}
|
||||
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.stored_count == 0
|
||||
}
|
||||
}
|
||||
|
||||
/// Reference to the node with link attached.
|
||||
|
|
Loading…
Reference in New Issue