Skip to content

Commit

Permalink
avoid deprecated methods in latest wkt
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkirk committed Jun 23, 2022
1 parent 9175d83 commit 18cc80c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 18cc80c

Please sign in to comment.