node_heights
for Trees
This commit is contained in:
parent
634393ba4a
commit
ea9828e2ae
@ -165,6 +165,10 @@ impl<'a, A: 'a + Ord + Clone> BinaryTreesUnbalanced<'a> for Trees<A> {
|
||||
fn balancing_error<T: 'a>(&self, _error: BalancingError) -> BTWrap<'a, Self, T> {
|
||||
panic!("balancing error.")
|
||||
}
|
||||
|
||||
fn node_heights(&self, node: &Self::Node) -> (u64, u64) {
|
||||
(node.l.height, node.r.height)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, A: 'a + Ord + Clone> BinaryTreesBindable<'a> for Trees<A> {
|
||||
|
Loading…
Reference in New Issue
Block a user