diff --git a/geo/src/algorithm/relate/geomgraph/planar_graph.rs b/geo/src/algorithm/relate/geomgraph/planar_graph.rs index 1b4fc7ebc..26e18d745 100644 --- a/geo/src/algorithm/relate/geomgraph/planar_graph.rs +++ b/geo/src/algorithm/relate/geomgraph/planar_graph.rs @@ -33,11 +33,7 @@ impl PlanarGraph { let mut graph = Self { nodes: self.nodes.clone(), // deep copy edges - edges: self - .edges - .iter() - .map(|e| e.clone()) - .collect(), + edges: self.edges.iter().map(|e| e.clone()).collect(), }; assert_eq!(from_arg_index, 0); if from_arg_index != to_arg_index { diff --git a/geo/src/algorithm/relate/relate_operation.rs b/geo/src/algorithm/relate/relate_operation.rs index 78913a685..76881ffb1 100644 --- a/geo/src/algorithm/relate/relate_operation.rs +++ b/geo/src/algorithm/relate/relate_operation.rs @@ -89,10 +89,10 @@ where // .graph_a // .compute_edge_intersections(&mut self.graph_b, Box::new(self.line_intersector.clone())); - // this is a copy of the above functionality to satisfy rust borrowing rules. // from here [... - let mut segment_intersector = SegmentIntersector::new(Box::new(self.line_intersector.clone()), false); + let mut segment_intersector = + SegmentIntersector::new(Box::new(self.line_intersector.clone()), false); segment_intersector.set_boundary_nodes( self.graph_a.boundary_nodes().cloned().collect(), self.graph_b.boundary_nodes().cloned().collect(),