diff --git a/src/flow/binary/balancing.rs b/src/flow/binary/balancing.rs index 4a7a766..2d8165a 100644 --- a/src/flow/binary/balancing.rs +++ b/src/flow/binary/balancing.rs @@ -147,8 +147,7 @@ impl<'a, BT: BinaryTreesUnbalanced<'a> + BinaryTreesTryJoin<'a>> BinaryTreesTryJ tr: Self::Tree, ) -> BTWrap<'a, Self, Self::Node> { let (hl, hr) = (self.0.height(&tl), self.0.height(&tr)); - let ctx = self.0.clone(); self.0 - .balancing_bind(balanced(hl, hr), |_| ctx.try_join(tl, key, tr)) + .balancing_bind(balanced(hl, hr), |_| self.0.try_join(tl, key, tr)) } } diff --git a/src/flow/binary/bounds/bound.rs b/src/flow/binary/bounds/bound.rs index 8848fe2..a92fdbf 100644 --- a/src/flow/binary/bounds/bound.rs +++ b/src/flow/binary/bounds/bound.rs @@ -71,11 +71,11 @@ impl<'a, BT: BinaryTreesBindable<'a>> BinaryTrees<'a> for BoundTrees { } fn resolve(&self, reference: &Self::Reference) -> BTWrap<'a, Self, Self::Node> { - let ctx = self.clone(); + let ctx = self.0.clone(); let bounds = reference.bounds.clone(); Self::bind(self.0.resolve(&reference.bound), move |node| { - let (_, _, key) = ctx.0.split(&node); - ctx.0.bounds_bind( + let (_, _, key) = ctx.split(&node); + ctx.bounds_bind( bounds.clone().split(&key, ctx.comparator()), |(boundsl, boundsr)| { Self::pure(BoundNode2 {