From 38994593fdcdb6a66a06c24cdf553152866dc462 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Fri, 15 Sep 2023 12:45:14 -0700 Subject: [PATCH] cargo clippy --fix --- src/geo_types_to_wkt.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/geo_types_to_wkt.rs b/src/geo_types_to_wkt.rs index adeefd8..76f94a0 100644 --- a/src/geo_types_to_wkt.rs +++ b/src/geo_types_to_wkt.rs @@ -293,7 +293,7 @@ fn g_linestring_to_w_linestring(g_linestring: &geo_types::LineString) -> L where T: CoordNum, { - let &geo_types::LineString(ref g_points) = g_linestring; + let geo_types::LineString(g_points) = g_linestring; g_points_to_w_linestring(g_points) } @@ -311,7 +311,7 @@ where { let mut w_lines = vec![]; for g_line in g_lines { - let &geo_types::LineString(ref g_points) = g_line; + let geo_types::LineString(g_points) = g_line; w_lines.push(g_points_to_w_linestring(g_points)); } w_lines @@ -342,14 +342,14 @@ where let mut poly_lines = vec![]; // Outer - let &geo_types::LineString(ref outer_points) = outer_line; + let geo_types::LineString(outer_points) = outer_line; if !outer_points.is_empty() { poly_lines.push(g_points_to_w_linestring(outer_points)); } // Inner let inner = g_lines_to_w_lines(inner_lines); - poly_lines.extend(inner.into_iter()); + poly_lines.extend(inner); Polygon(poly_lines) } @@ -358,7 +358,7 @@ fn g_mpoint_to_w_mpoint(g_mpoint: &geo_types::MultiPoint) -> MultiPoint where T: CoordNum, { - let &geo_types::MultiPoint(ref g_points) = g_mpoint; + let geo_types::MultiPoint(g_points) = g_mpoint; let w_points = g_points_to_w_points(g_points); MultiPoint(w_points) } @@ -367,7 +367,7 @@ fn g_mline_to_w_mline(g_mline: &geo_types::MultiLineString) -> MultiLineSt where T: CoordNum, { - let &geo_types::MultiLineString(ref g_lines) = g_mline; + let geo_types::MultiLineString(g_lines) = g_mline; let w_lines = g_lines_to_w_lines(g_lines); MultiLineString(w_lines) } @@ -387,7 +387,7 @@ fn g_mpolygon_to_w_mpolygon(g_mpolygon: &geo_types::MultiPolygon) -> Multi where T: CoordNum, { - let &geo_types::MultiPolygon(ref g_polygons) = g_mpolygon; + let geo_types::MultiPolygon(g_polygons) = g_mpolygon; let w_polygons = g_polygons_to_w_polygons(g_polygons); MultiPolygon(w_polygons) } @@ -396,7 +396,7 @@ fn g_geocol_to_w_geocol(g_geocol: &geo_types::GeometryCollection) -> Geome where T: CoordNum, { - let &geo_types::GeometryCollection(ref g_geoms) = g_geocol; + let geo_types::GeometryCollection(g_geoms) = g_geocol; let mut w_geoms = vec![]; for g_geom in g_geoms { let w_geom = g_geom_to_w_geom(g_geom);