BinaryTreesHeight
for BalancedTrees
This commit is contained in:
parent
00e906691c
commit
7ec5f413c6
@ -126,3 +126,13 @@ impl<'a, BT: BinaryTreesUnbalanced<'a> + BinaryTreesEmpty<'a>> BinaryTreesEmpty<
|
||||
self.0.split_key_empty(tree, key)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, BT: BinaryTreesUnbalanced<'a>> BinaryTreesHeight<'a> for BalancedTrees<BT> {
|
||||
fn height(&self, tree: &Self::Tree) -> u64 {
|
||||
self.0.height(tree)
|
||||
}
|
||||
|
||||
fn leaf_height_error<T: 'a>(&self, height: u64) -> BTWrap<'a, Self, T> {
|
||||
self.0.leaf_height_error(height)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user