From ca6974a5a803a5832759a0ac893897a13e5aaa4b Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Tue, 22 Feb 2022 16:30:02 +0000 Subject: [PATCH] Update code to remove geometry deprecation warnings --- lib/src/sql/geometry.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/src/sql/geometry.rs b/lib/src/sql/geometry.rs index e06e7097..4c4a9182 100644 --- a/lib/src/sql/geometry.rs +++ b/lib/src/sql/geometry.rs @@ -259,7 +259,7 @@ impl fmt::Display for Geometry { Geometry::Line(v) => write!( f, "{{ type: 'LineString', coordinates: [{}] }}", - v.points_iter() + v.points() .map(|ref v| format!("[{}, {}]", v.x(), v.y())) .collect::>() .join(", ") @@ -268,7 +268,7 @@ impl fmt::Display for Geometry { f, "{{ type: 'Polygon', coordinates: [[{}]{}] }}", v.exterior() - .points_iter() + .points() .map(|ref v| format!("[{}, {}]", v.x(), v.y())) .collect::>() .join(", "), @@ -281,7 +281,7 @@ impl fmt::Display for Geometry { .map(|i| { format!( "[{}]", - i.points_iter() + i.points() .map(|ref v| format!("[{}, {}]", v.x(), v.y())) .collect::>() .join(", ") @@ -308,7 +308,7 @@ impl fmt::Display for Geometry { v.iter() .map(|v| format!( "[{}]", - v.points_iter() + v.points() .map(|ref v| format!("[{}, {}]", v.x(), v.y())) .collect::>() .join(", ") @@ -323,7 +323,7 @@ impl fmt::Display for Geometry { .map(|v| format!( "[[{}]{}]", v.exterior() - .points_iter() + .points() .map(|ref v| format!("[{}, {}]", v.x(), v.y())) .collect::>() .join(", "), @@ -336,7 +336,7 @@ impl fmt::Display for Geometry { .map(|i| { format!( "[{}]", - i.points_iter() + i.points() .map(|ref v| format!("[{}, {}]", v.x(), v.y())) .collect::>() .join(", ") @@ -382,7 +382,7 @@ impl Serialize for Geometry { map.serialize_value("LineString")?; map.serialize_key("coordinates")?; map.serialize_value( - v.points_iter() + v.points() .map(|p| vec![p.x(), p.y()]) .collect::>>() .as_slice(), @@ -397,7 +397,7 @@ impl Serialize for Geometry { map.serialize_value( vec![v .exterior() - .points_iter() + .points() .map(|p| vec![p.x(), p.y()]) .collect::>>()] .into_iter() @@ -405,7 +405,7 @@ impl Serialize for Geometry { v.interiors() .into_iter() .map(|i| { - i.points_iter() + i.points() .map(|p| vec![p.x(), p.y()]) .collect::>>() })