Update geo-types to 0.7.8 (#1032)

* Update geo-types to 0.7.8

* Replace deprecated `geo::Coordinate` type
This commit is contained in:
Matthieu Foucault 2022-12-06 03:18:07 -08:00 committed by GitHub
parent ad99823cc8
commit aa40be4e82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

4
Cargo.lock generated
View File

@ -1540,9 +1540,9 @@ dependencies = [
[[package]]
name = "geo-types"
version = "0.7.7"
version = "0.7.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8d77ceb80f375dc4cda113a3ae1b06a36ef623f8f035c03752ca6698f4ddfee"
checksum = "e26879b63ac36ca5492918dc16f8c1e604b0f70f884fffbd3533f89953ab1991"
dependencies = [
"approx",
"num-traits",

View File

@ -1197,7 +1197,7 @@ fn to_set(pts: &[Pt2D]) -> (HashSet<HashablePt2D>, HashSet<HashablePt2D>) {
impl From<&PolyLine> for geo::LineString {
fn from(poly_line: &PolyLine) -> Self {
let coords: Vec<geo::Coordinate> = poly_line
let coords: Vec<geo::Coord> = poly_line
.pts
.iter()
.map(|pt| geo::coord! { x: pt.x(), y: pt.y() })

View File

@ -166,9 +166,9 @@ impl HashablePt2D {
}
}
impl From<Pt2D> for geo::Coordinate {
impl From<Pt2D> for geo::Coord {
fn from(pt: Pt2D) -> Self {
geo::Coordinate { x: pt.x, y: pt.y }
geo::Coord { x: pt.x, y: pt.y }
}
}
@ -178,8 +178,8 @@ impl From<Pt2D> for geo::Point {
}
}
impl From<geo::Coordinate> for Pt2D {
fn from(coord: geo::Coordinate) -> Self {
impl From<geo::Coord> for Pt2D {
fn from(coord: geo::Coord) -> Self {
Pt2D::new(coord.x, coord.y)
}
}

View File

@ -285,7 +285,7 @@ impl From<Ring> for geo::LineString {
let coords = ring
.pts
.into_iter()
.map(geo::Coordinate::from)
.map(geo::Coord::from)
.collect::<Vec<_>>();
Self(coords)
}