diff --git a/geo-types/src/geometry.rs b/geo-types/src/geometry.rs index b7f74ac50..fb97a4c3b 100644 --- a/geo-types/src/geometry.rs +++ b/geo-types/src/geometry.rs @@ -64,7 +64,7 @@ impl Geometry { /// let p2: Point = g.as_point().unwrap(); /// assert_eq!(p2, Point::new(0., 0.,)); /// ``` - pub fn as_point(self) -> Option> { + pub fn into_point(self) -> Option> { if let Geometry::Point(x) = self { Some(x) } else { @@ -73,7 +73,7 @@ impl Geometry { } /// If this Geometry is a LineString, then return that LineString, else None. - pub fn as_linestring(self) -> Option> { + pub fn into_line_string(self) -> Option> { if let Geometry::LineString(x) = self { Some(x) } else { @@ -82,7 +82,7 @@ impl Geometry { } /// If this Geometry is a Line, then return that Line, else None. - pub fn as_line(self) -> Option> { + pub fn into_line(self) -> Option> { if let Geometry::Line(x) = self { Some(x) } else { @@ -91,7 +91,7 @@ impl Geometry { } /// If this Geometry is a Polygon, then return that, else None. - pub fn as_polygon(self) -> Option> { + pub fn into_polygon(self) -> Option> { if let Geometry::Polygon(x) = self { Some(x) } else { @@ -100,7 +100,7 @@ impl Geometry { } /// If this Geometry is a MultiPoint, then return that, else None. - pub fn as_multipoint(self) -> Option> { + pub fn into_multi_point(self) -> Option> { if let Geometry::MultiPoint(x) = self { Some(x) } else { @@ -109,7 +109,7 @@ impl Geometry { } /// If this Geometry is a MultiLineString, then return that, else None. - pub fn as_multilinestring(self) -> Option> { + pub fn into_multi_line_string(self) -> Option> { if let Geometry::MultiLineString(x) = self { Some(x) } else { @@ -118,7 +118,7 @@ impl Geometry { } /// If this Geometry is a MultiPolygon, then return that, else None. - pub fn as_multipolygon(self) -> Option> { + pub fn into_multi_polygon(self) -> Option> { if let Geometry::MultiPolygon(x) = self { Some(x) } else {