Skip to content

Commit

Permalink
Remove deref of immutable expression – the compiler can auto-deref th…
Browse files Browse the repository at this point in the history
…e reborrow

We now reborrow, but we could also deref:
accum = accum.union(&**poly.0);
  • Loading branch information
urschrei committed Nov 3, 2024
1 parent f04f014 commit 5a86f6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion geo/src/algorithm/bool_ops/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ where
let fold = |mut accum: MultiPolygon<T>,
poly: &CachedEnvelope<RTreeObjectRef<'a, Boppable>>|
-> MultiPolygon<T> {
accum = accum.union((&*poly).0);
accum = accum.union(poly.0);
accum
};
let reduce = |accum1: MultiPolygon<T>, accum2: MultiPolygon<T>| -> MultiPolygon<T> {
Expand Down

0 comments on commit 5a86f6a

Please sign in to comment.