diff --git a/src/art.rs b/src/art.rs index f0c4eeb..691c268 100644 --- a/src/art.rs +++ b/src/art.rs @@ -582,7 +582,7 @@ impl Node { NodeType::Node16(n) => n.num_children(), NodeType::Node48(n) => n.num_children(), NodeType::Node256(n) => n.num_children(), - NodeType::Twig(n) => n.num_children(), + NodeType::Twig(_) => 0, } } diff --git a/src/node.rs b/src/node.rs index c799b42..86fcad1 100644 --- a/src/node.rs +++ b/src/node.rs @@ -61,12 +61,7 @@ impl TwigNode { } } - #[inline(always)] - pub fn num_children(&self) -> usize { - self.values.len() - } - - pub fn version(&self) -> u64 { + pub(crate) fn version(&self) -> u64 { self.values .iter() .map(|value| value.version) @@ -284,12 +279,12 @@ impl FlatNode { new_node } - pub fn get_value_if_single_child(&self) -> (&P, Option>) { + pub(crate) fn get_value_if_single_child(&self) -> (&P, Option>) { assert_eq!(self.num_children, 1); (&self.prefix, self.children[0].clone()) } - pub fn grow(&self) -> Node48 { + pub(crate) fn grow(&self) -> Node48 { let mut n48 = Node48::new(self.prefix.clone()); for i in 0..self.num_children as usize { if let Some(child) = self.children[i].as_ref() {