diff --git a/geo/src/algorithm/bool_ops/mod.rs b/geo/src/algorithm/bool_ops/mod.rs index 80ee01b34..e1929f6cf 100644 --- a/geo/src/algorithm/bool_ops/mod.rs +++ b/geo/src/algorithm/bool_ops/mod.rs @@ -190,12 +190,12 @@ pub trait UnaryUnion { // Though the operation is carried out via fold() over the tree iterator, there are two actual nested operations: // "fold" operations on leaf nodes build up output MultiPolygons by adding Polygons to them via union and // "reduce" operations on parent nodes combine these output MultiPolygons from leaf operations by recursion -fn bottom_up_fold_reduce(ops: &mut Ops, parent: &ParentNode) -> S +fn bottom_up_fold_reduce(ops: &Ops, parent: &ParentNode) -> S where T: RTreeObject, - I: FnMut() -> S, - F: FnMut(S, &T) -> S, - R: FnMut(S, S) -> S, + I: Fn() -> S, + F: Fn(S, &T) -> S, + R: Fn(S, S) -> S, { parent .children() @@ -272,8 +272,8 @@ where .map(|p| CachedEnvelope::new(ObjectRef::new(p))) .collect(), ); - let mut ops = Ops { init, fold, reduce }; - bottom_up_fold_reduce(&mut ops, rtree.root()) + let ops = Ops { init, fold, reduce }; + bottom_up_fold_reduce(&ops, rtree.root()) } }