Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default impl for CoordNum in Geometries #832

Merged
merged 5 commits into from
Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
avoid deprecated methods in latest wkt
  • Loading branch information
michaelkirk committed Jun 23, 2022
commit 18cc80c5c44f0d8bd646df38830ea6f3a6c4e859
2 changes: 1 addition & 1 deletion jts-test-runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include_dir = { version = "0.6.0", features = ["glob"] }
log = "0.4.14"
serde = { version = "1.0.105", features = ["derive"] }
serde-xml-rs = "0.5.0"
wkt = { version = "0.10.0", features = ["geo-types", "serde"] }
wkt = { version = "0.10.3", features = ["geo-types", "serde"] }

[dev-dependencies]
pretty_env_logger = "0.4.0"
6 changes: 3 additions & 3 deletions jts-test-runner/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub(crate) struct Case {
#[serde(default)]
pub(crate) desc: String,

#[serde(deserialize_with = "wkt::deserialize_geometry")]
#[serde(deserialize_with = "wkt::deserialize_wkt")]
pub(crate) a: Geometry<f64>,

#[serde(deserialize_with = "deserialize_opt_geometry", default)]
Expand Down Expand Up @@ -66,7 +66,7 @@ pub struct CentroidInput {
pub struct ConvexHullInput {
pub(crate) arg1: String,

#[serde(rename = "$value", deserialize_with = "wkt::deserialize_geometry")]
#[serde(rename = "$value", deserialize_with = "wkt::deserialize_wkt")]
pub(crate) expected: geo::Geometry<f64>,
}

Expand Down Expand Up @@ -215,7 +215,7 @@ where
D: Deserializer<'de>,
{
#[derive(Debug, Deserialize)]
struct Wrapper(#[serde(deserialize_with = "wkt::deserialize_geometry")] Geometry<f64>);
struct Wrapper(#[serde(deserialize_with = "wkt::deserialize_wkt")] Geometry<f64>);

Option::<Wrapper>::deserialize(deserializer).map(|opt_wrapped| opt_wrapped.map(|w| w.0))
}
Expand Down