more idiomatic naming

This commit is contained in:
NikVolf 2019-09-25 09:53:06 +02:00
parent 443f45f430
commit da0d0a669a
2 changed files with 6 additions and 3 deletions

View File

@ -39,8 +39,11 @@ impl Iterator for NodeDataIterator {
impl NodeDataIterator { impl NodeDataIterator {
pub fn new() -> Self { pub fn new() -> Self {
let mut root: Entry = NodeData::combine(&leaf(1), &leaf(2)).into(); let root = Entry::new(
root.update_siblings(EntryLink::Stored(0), EntryLink::Stored(1)); NodeData::combine(&leaf(1), &leaf(2)),
EntryLink::Stored(0),
EntryLink::Stored(1)
);
let tree = let tree =
Tree::new( Tree::new(
3, 3,

View File

@ -33,7 +33,7 @@ impl Entry {
} }
/// Is this node a leaf. /// 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 } if let EntryKind::Leaf = self.kind { true } else { false }
} }