From 0b29004de2471a3b011f19b5f28ea27f6d215194 Mon Sep 17 00:00:00 2001 From: timofey Date: Fri, 16 Jun 2023 13:41:41 +0000 Subject: [PATCH] remove `height_r` --- src/flow/binary.rs | 1 - src/flow/binary/bounds/bound.rs | 4 ---- src/mrds/trees/avl.rs | 4 ---- src/rstd/collections/avl/context.rs | 4 ---- 4 files changed, 13 deletions(-) diff --git a/src/flow/binary.rs b/src/flow/binary.rs index 8f3bc7f..41fe14b 100644 --- a/src/flow/binary.rs +++ b/src/flow/binary.rs @@ -133,7 +133,6 @@ pub trait BinaryTreesMutable<'a>: BinaryTreesEmpty<'a> + BinaryTreesTreeOf<'a> { pub trait BinaryTreesHeight<'a>: BinaryTrees<'a> { fn height(&self, tree: &Self::Tree) -> u64; - fn height_r(&self, reference: &Self::Reference) -> u64; fn leaf_height_error(&self, height: u64) -> BTWrap<'a, Self, T>; } diff --git a/src/flow/binary/bounds/bound.rs b/src/flow/binary/bounds/bound.rs index 89cad47..8848fe2 100644 --- a/src/flow/binary/bounds/bound.rs +++ b/src/flow/binary/bounds/bound.rs @@ -155,10 +155,6 @@ impl<'a, BT: BinaryTreesBindable<'a> + BinaryTreesHeight<'a>> BinaryTreesHeight< self.0.height(&tree.bound) } - fn height_r(&self, reference: &Self::Reference) -> u64 { - self.0.height_r(&reference.bound) - } - fn leaf_height_error(&self, height: u64) -> BTWrap<'a, Self, T> { self.0.leaf_height_error(height) } diff --git a/src/mrds/trees/avl.rs b/src/mrds/trees/avl.rs index 9a1eca9..f1d017a 100644 --- a/src/mrds/trees/avl.rs +++ b/src/mrds/trees/avl.rs @@ -181,10 +181,6 @@ impl<'a, A: 'a + PartialOrd + Clone> BinaryTreesHeight<'a> for AvlTs { tree.height } - fn height_r(&self, reference: &Self::Reference) -> u64 { - reference.height - } - fn leaf_height_error(&self, height: u64) -> BTWrap<'a, Self, T> { panic!("leaf height error: {height}.") } diff --git a/src/rstd/collections/avl/context.rs b/src/rstd/collections/avl/context.rs index 3d25987..eb2afb9 100644 --- a/src/rstd/collections/avl/context.rs +++ b/src/rstd/collections/avl/context.rs @@ -108,10 +108,6 @@ impl<'a, Ctx: Context<'a>, A: Mentionable<'a, Ctx> + Clone, C: 'a + Comparator u64 { - reference.height() - } - fn leaf_height_error(&self, height: u64) -> BTWrap<'a, Self, T> { as Fail<_>>::fail(ResolutionError::Parse(BoundError::Avl( AvlError::LeafHeight(height),