mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-25 22:13:27 +03:00
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:
parent
ad99823cc8
commit
aa40be4e82
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -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",
|
||||
|
@ -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() })
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user