Skip to content

Commit

Permalink
Ops and driver fns for single-threaded unary union don't need mutability
Browse files Browse the repository at this point in the history
  • Loading branch information
urschrei committed Nov 6, 2024
1 parent 537b664 commit d9f47a0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions geo/src/algorithm/bool_ops/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T, S, I, F, R>(ops: &mut Ops<I, F, R>, parent: &ParentNode<T>) -> S
fn bottom_up_fold_reduce<T, S, I, F, R>(ops: &Ops<I, F, R>, parent: &ParentNode<T>) -> 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()
Expand Down Expand Up @@ -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())
}
}

Expand Down

0 comments on commit d9f47a0

Please sign in to comment.