BoundNode2
-> BoundNode
This commit is contained in:
parent
57bb3a5d4a
commit
c368a51fe1
@ -17,7 +17,7 @@ impl<A, T> std::ops::Deref for Bound<A, T> {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct BoundNode2<A, T> {
|
||||
pub struct BoundNode<A, T> {
|
||||
boundsl: Bounds<A>,
|
||||
boundsr: Bounds<A>,
|
||||
bounds: Bounds<A>,
|
||||
@ -53,7 +53,7 @@ pub trait BinaryTreesBindable<'a>: BinaryTrees<'a> {
|
||||
}
|
||||
|
||||
impl<'a, BT: BinaryTreesBindable<'a>> BinaryTrees<'a> for BoundTrees<BT> {
|
||||
type Node = BoundNode2<Self::Key, BT::Node>;
|
||||
type Node = BoundNode<Self::Key, BT::Node>;
|
||||
|
||||
type Reference = Bound<Self::Key, BT::Reference>;
|
||||
|
||||
@ -92,7 +92,7 @@ impl<'a, BT: BinaryTreesBindable<'a>> BinaryTrees<'a> for BoundTrees<BT> {
|
||||
ctx.bounds_bind(
|
||||
bounds.clone().split(&key, ctx.comparator()),
|
||||
|(boundsl, boundsr)| {
|
||||
Self::pure(BoundNode2 {
|
||||
Self::pure(BoundNode {
|
||||
boundsl,
|
||||
boundsr,
|
||||
bounds,
|
||||
@ -187,13 +187,11 @@ impl<'a, BT: BinaryTreesBindable<'a> + BinaryTreesTryJoin<'a>> BinaryTreesTryJoi
|
||||
self.0.bounds_bind(
|
||||
Bounds::join(boundsl.clone(), boundsr.clone(), &key, self.comparator()),
|
||||
|bounds| {
|
||||
Self::fmap(self.0.try_join(tl.bound, key, tr.bound), |node| {
|
||||
BoundNode2 {
|
||||
Self::fmap(self.0.try_join(tl.bound, key, tr.bound), |node| BoundNode {
|
||||
boundsl,
|
||||
boundsr,
|
||||
bounds,
|
||||
node,
|
||||
}
|
||||
})
|
||||
},
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user