From 5a86f6a5eedb6c169c236b9e7758f27f90e6e67d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20H=C3=BCgel?= Date: Sun, 3 Nov 2024 19:05:21 +0000 Subject: [PATCH] =?UTF-8?q?Remove=20deref=20of=20immutable=20expression=20?= =?UTF-8?q?=E2=80=93=20the=20compiler=20can=20auto-deref=20the=20reborrow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We now reborrow, but we could also deref: accum = accum.union(&**poly.0); --- geo/src/algorithm/bool_ops/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geo/src/algorithm/bool_ops/mod.rs b/geo/src/algorithm/bool_ops/mod.rs index 2623caea0..c5bfa3a12 100644 --- a/geo/src/algorithm/bool_ops/mod.rs +++ b/geo/src/algorithm/bool_ops/mod.rs @@ -257,7 +257,7 @@ where let fold = |mut accum: MultiPolygon, poly: &CachedEnvelope>| -> MultiPolygon { - accum = accum.union((&*poly).0); + accum = accum.union(poly.0); accum }; let reduce = |accum1: MultiPolygon, accum2: MultiPolygon| -> MultiPolygon {