diff --git a/examples/lib/shared.rs b/examples/lib/shared.rs index 7ead49ddf..4cd926212 100644 --- a/examples/lib/shared.rs +++ b/examples/lib/shared.rs @@ -39,8 +39,11 @@ impl Iterator for NodeDataIterator { impl NodeDataIterator { pub fn new() -> Self { - let mut root: Entry = NodeData::combine(&leaf(1), &leaf(2)).into(); - root.update_siblings(EntryLink::Stored(0), EntryLink::Stored(1)); + let root = Entry::new( + NodeData::combine(&leaf(1), &leaf(2)), + EntryLink::Stored(0), + EntryLink::Stored(1) + ); let tree = Tree::new( 3, diff --git a/src/entry.rs b/src/entry.rs index b20855523..a3f14a8bb 100644 --- a/src/entry.rs +++ b/src/entry.rs @@ -33,7 +33,7 @@ impl Entry { } /// Is this node a leaf. - pub fn is_leaf(&self) -> bool { + pub fn leaf(&self) -> bool { if let EntryKind::Leaf = self.kind { true } else { false } }