Skip to content

Commit

Permalink
Merge pull request #681 from datanel/upgrade_crates
Browse files Browse the repository at this point in the history
[tech] upgrade crates
  • Loading branch information
ArnaudOggy authored Jul 28, 2020
2 parents 206e52a + afdfb0b commit 1e46a1a
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 24 deletions.
9 changes: 4 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["Kisio Digital <[email protected]>", "Guillaume Pinot <[email protected]>"]
name = "transit_model"
version = "0.25.0"
version = "0.26.0"
license = "AGPL-3.0-only"
description = "Transit data management"
repository = "https://github.com/CanalTP/transit_model"
Expand Down Expand Up @@ -42,8 +42,7 @@ chrono = "0.4"
csv = "1"
derivative = "2"
failure = "0.1"
geo = "0.12"
geo-types = "0.4"
geo = "0.14"
iso4217 = "0.3"
lazy_static = "1"
log = "0.4"
Expand All @@ -53,7 +52,7 @@ minidom_ext = "1"
minidom_writer = "1"
num-traits = "0.2"
pretty_assertions = "0.6"
proj = { version = "0.14", optional = true }
proj = { version = "0.19", optional = true }
quick-xml = "0.18"
relational_types = "1"
rust_decimal = "1"
Expand All @@ -63,7 +62,7 @@ skip_error = { version = "1", features = ["log"] }
tempfile = "3"
typed_index_collection = "1"
walkdir = "2"
wkt = "0.5"
wkt = "0.8"
zip = "0.5"

[[test]]
Expand Down
2 changes: 1 addition & 1 deletion gtfs2netexfr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ slog-scope = "4.1"
slog-stdlog = "4.0"
slog-term = "2.4"
structopt = "0.3"
transit_model = { version = "0.25", path = "../", features = ["proj"] }
transit_model = { version = "0.26", path = "../", features = ["proj"] }
2 changes: 1 addition & 1 deletion gtfs2ntfs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ slog-scope = "4.1"
slog-stdlog = "4.0"
slog-term = "2.4"
structopt = "0.3"
transit_model = { version = "0.25", path = "../" }
transit_model = { version = "0.26", path = "../" }
2 changes: 1 addition & 1 deletion ntfs2gtfs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ slog-scope = "4.1"
slog-stdlog = "4.0"
slog-term = "2.4"
structopt = "0.3"
transit_model = { version = "0.25", path = "../" }
transit_model = { version = "0.26", path = "../" }
2 changes: 1 addition & 1 deletion ntfs2netexfr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ slog-scope = "4.1"
slog-stdlog = "4.0"
slog-term = "2.4"
structopt = "0.3"
transit_model = { version = "0.25", path = "../", features = ["proj"] }
transit_model = { version = "0.26", path = "../", features = ["proj"] }
2 changes: 1 addition & 1 deletion ntfs2ntfs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ slog-scope = "4.1"
slog-stdlog = "4.0"
slog-term = "2.4"
structopt = "0.3"
transit_model = { version = "0.25", path = "../" }
transit_model = { version = "0.26", path = "../" }
2 changes: 1 addition & 1 deletion restrict-validity-period/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ slog-scope = "4.1"
slog-stdlog = "4.0"
slog-term = "2.4"
structopt = "0.3"
transit_model = { version = "0.25", path = "../" }
transit_model = { version = "0.26", path = "../" }
4 changes: 2 additions & 2 deletions src/gtfs/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use crate::{
};
use derivative::Derivative;
use failure::{bail, format_err, Error, ResultExt};
use geo_types::{LineString, Point};
use geo::{LineString, Point};
use log::{info, warn, Level as LogLevel};
use serde::Deserialize;
use skip_error::skip_error_and_log;
Expand Down Expand Up @@ -1361,7 +1361,7 @@ mod tests {
test_utils::*,
AddPrefix, PrefixConfiguration,
};
use geo_types::line_string;
use geo::line_string;
use pretty_assertions::assert_eq;
use typed_index_collection::Id;

Expand Down
4 changes: 2 additions & 2 deletions src/gtfs/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use crate::objects::Transfer as NtfsTransfer;
use crate::objects::*;
use crate::Result;
use failure::ResultExt;
use geo_types::Geometry as GeoGeometry;
use geo::Geometry as GeoGeometry;
use log::{info, warn};
use relational_types::IdxSet;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -532,7 +532,7 @@ mod tests {
Transfer as NtfsTransfer,
},
};
use geo_types::{line_string, point};
use geo::{line_string, point};
use pretty_assertions::assert_eq;
use std::{collections::BTreeSet, fs::File, io::Read};
use tempfile::tempdir;
Expand Down
4 changes: 2 additions & 2 deletions src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use chrono::NaiveDate;
use derivative::Derivative;
use failure::{bail, format_err};
use geo::algorithm::centroid::Centroid;
use geo_types::MultiPoint;
use geo::MultiPoint;
use lazy_static::lazy_static;
use log::{debug, warn, Level as LogLevel};
use relational_types::{GetCorresponding, IdxSet, ManyToMany, OneToMany, Relation};
Expand Down Expand Up @@ -1746,7 +1746,7 @@ mod tests {

mod check_geometries_coherence {
use super::*;
use geo_types::{Geometry as GeoGeometry, Point as GeoPoint};
use geo::{Geometry as GeoGeometry, Point as GeoPoint};
use pretty_assertions::assert_eq;

#[test]
Expand Down
2 changes: 1 addition & 1 deletion src/ntfs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ mod tests {
use crate::calendars::{manage_calendars, write_calendar_dates};
use crate::objects::Availability;
use crate::{read_utils::PathFileHandler, test_utils::*};
use geo_types::line_string;
use geo::line_string;
use pretty_assertions::assert_eq;
use std::{
collections::{BTreeMap, BTreeSet, HashMap},
Expand Down
2 changes: 1 addition & 1 deletion src/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use crate::{utils::*, AddPrefix, PrefixConfiguration};
use chrono::NaiveDate;
use derivative::Derivative;
use geo_types::{Geometry as GeoGeometry, Point as GeoPoint};
use geo::{Geometry as GeoGeometry, Point as GeoPoint};
use rust_decimal::Decimal;
use serde::{Deserialize, Serialize};
use std::cmp::Ordering;
Expand Down
7 changes: 2 additions & 5 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ where
de_with_invalid_option(de).map(|opt| opt.unwrap_or_else(Default::default))
}

pub fn de_wkt<'de, D>(deserializer: D) -> Result<geo_types::Geometry<f64>, D::Error>
pub fn de_wkt<'de, D>(deserializer: D) -> Result<geo::Geometry<f64>, D::Error>
where
D: serde::Deserializer<'de>,
{
Expand Down Expand Up @@ -270,10 +270,7 @@ where
serializer.serialize_str(&currency_code.alpha3.to_string())
}

pub fn ser_geometry<S>(
geometry: &geo_types::Geometry<f64>,
serializer: S,
) -> Result<S::Ok, S::Error>
pub fn ser_geometry<S>(geometry: &geo::Geometry<f64>, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
Expand Down

0 comments on commit 1e46a1a

Please sign in to comment.