From 11d209c3c4458a4a8c8ed44ad1f4fc188216464b Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Tue, 26 Nov 2024 15:12:02 -0500 Subject: [PATCH] Use `Error` instead of `std::error::Error` --- src/to_wkt/geo_trait_impl.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/to_wkt/geo_trait_impl.rs b/src/to_wkt/geo_trait_impl.rs index 5f10991..6be4d56 100644 --- a/src/to_wkt/geo_trait_impl.rs +++ b/src/to_wkt/geo_trait_impl.rs @@ -62,7 +62,7 @@ pub fn write_point, W: Write>( pub fn write_linestring, W: Write>( linestring: &G, f: &mut W, -) -> Result<(), crate::error::Error> { +) -> Result<(), Error> { let dim = linestring.dim(); // Write prefix match dim { @@ -89,7 +89,7 @@ pub fn write_linestring, W: pub fn write_polygon, W: Write>( polygon: &G, f: &mut W, -) -> Result<(), crate::error::Error> { +) -> Result<(), Error> { let dim = polygon.dim(); // Write prefix match dim { @@ -126,7 +126,7 @@ pub fn write_polygon, W: Write> pub fn write_multi_point, W: Write>( multipoint: &G, f: &mut W, -) -> Result<(), crate::error::Error> { +) -> Result<(), Error> { let dim = multipoint.dim(); // Write prefix match dim { @@ -174,7 +174,7 @@ pub fn write_multi_linestring< >( multilinestring: &G, f: &mut W, -) -> Result<(), crate::error::Error> { +) -> Result<(), Error> { let dim = multilinestring.dim(); // Write prefix match dim { @@ -212,7 +212,7 @@ pub fn write_multi_linestring< pub fn write_multi_polygon, W: Write>( multipolygon: &G, f: &mut W, -) -> Result<(), crate::error::Error> { +) -> Result<(), Error> { let dim = multipolygon.dim(); // Write prefix match dim { @@ -264,7 +264,7 @@ pub fn write_multi_polygon pub fn write_geometry, W: Write>( geometry: &G, f: &mut W, -) -> Result<(), crate::error::Error> { +) -> Result<(), Error> { match geometry.as_type() { geo_traits::GeometryType::Point(point) => write_point(point, f), geo_traits::GeometryType::LineString(linestring) => write_linestring(linestring, f), @@ -288,7 +288,7 @@ pub fn write_geometry_collection< >( gc: &G, f: &mut W, -) -> Result<(), crate::error::Error> { +) -> Result<(), Error> { let dim = gc.dim(); // Write prefix match dim { @@ -325,7 +325,7 @@ pub fn write_geometry_collection< pub fn write_rect, W: Write>( rect: &G, f: &mut W, -) -> Result<(), crate::error::Error> { +) -> Result<(), Error> { // Write prefix and error if not 2D match rect.dim() { geo_traits::Dimensions::Xy | geo_traits::Dimensions::Unknown(2) => f.write_str("POLYGON"), @@ -377,7 +377,7 @@ pub fn write_rect, W: Write>( pub fn write_triangle, W: Write>( triangle: &G, f: &mut W, -) -> Result<(), crate::error::Error> { +) -> Result<(), Error> { let dim = triangle.dim(); // Write prefix match dim { @@ -406,7 +406,7 @@ pub fn write_triangle, W: Writ pub fn write_line, W: Write>( line: &G, f: &mut W, -) -> Result<(), crate::error::Error> { +) -> Result<(), Error> { let dim = line.dim(); // Write prefix match dim { @@ -471,7 +471,7 @@ fn add_coord_sequence>( mut coords: impl Iterator, f: &mut W, size: PhysicalCoordinateDimension, -) -> Result<(), crate::error::Error> { +) -> Result<(), Error> { f.write_char('(')?; if let Some(first_coord) = coords.next() {