From 44b2708f7a85f2568ed5c0ca9dec503fd07d4c99 Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Mon, 1 Aug 2022 19:38:22 +0200 Subject: [PATCH] Bump serde_with --- Cargo.lock | 32 ++++++++++++++++------------- crates/axum-utils/Cargo.toml | 4 ++-- crates/config/Cargo.toml | 4 ++-- crates/data-model/Cargo.toml | 2 +- crates/handlers/Cargo.toml | 4 ++-- crates/http/Cargo.toml | 2 +- crates/iana-codegen/Cargo.toml | 2 +- crates/iana/Cargo.toml | 2 +- crates/jose/Cargo.toml | 4 ++-- crates/oauth2-types/Cargo.toml | 4 ++-- crates/oauth2-types/src/requests.rs | 4 ++-- crates/policy/Cargo.toml | 2 +- crates/router/Cargo.toml | 4 ++-- crates/router/src/endpoints.rs | 6 ++++-- crates/storage/Cargo.toml | 2 +- crates/templates/Cargo.toml | 2 +- 16 files changed, 43 insertions(+), 37 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 78bd3330..83f222d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1160,9 +1160,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.13.4" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" +checksum = "4529658bdda7fd6769b8614be250cdcfc3aeb0ee72fe66f9e41e5e5eb73eac02" dependencies = [ "darling_core", "darling_macro", @@ -1170,9 +1170,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.13.4" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" +checksum = "649c91bc01e8b1eac09fb91e8dbc7d517684ca6be8ebc75bb9cafc894f9fdb6f" dependencies = [ "fnv", "ident_case", @@ -1184,9 +1184,9 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.13.4" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" +checksum = "ddfc69c5bfcbd2fc09a0f38451d2daf0e372e367986a83906d1b0dbc88134fb5" dependencies = [ "darling_core", "quote", @@ -3897,9 +3897,9 @@ checksum = "a2333e6df6d6598f2b1974829f853c2b4c5f4a6e503c10af918081aa6f8564e1" [[package]] name = "serde" -version = "1.0.140" +version = "1.0.141" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc855a42c7967b7c369eb5860f7164ef1f6f81c20c7cc1141f2a604e18723b03" +checksum = "7af873f2c95b99fcb0bd0fe622a43e29514658873c8ceba88c4cb88833a22500" dependencies = [ "serde_derive", ] @@ -3919,9 +3919,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.140" +version = "1.0.141" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2122636b9fe3b81f1cb25099fcf2d3f542cdb1d45940d56c713158884a05da" +checksum = "75743a150d003dd863b51dc809bcad0d73f2102c53632f1e954e738192a3413f" dependencies = [ "proc-macro2", "quote", @@ -3964,22 +3964,25 @@ dependencies = [ [[package]] name = "serde_with" -version = "1.14.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" +checksum = "89df7a26519371a3cce44fbb914c2819c84d9b897890987fa3ab096491cc0ea8" dependencies = [ "base64", "chrono", "hex", + "indexmap", "serde", + "serde_json", "serde_with_macros", + "time 0.3.12", ] [[package]] name = "serde_with_macros" -version = "1.5.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" +checksum = "de337f322382fcdfbb21a014f7c224ee041a23785651db67b9827403178f698f" dependencies = [ "darling", "proc-macro2", @@ -4458,6 +4461,7 @@ dependencies = [ "js-sys", "libc", "num_threads", + "serde", "time-macros", ] diff --git a/crates/axum-utils/Cargo.toml b/crates/axum-utils/Cargo.toml index 4c2fae9e..fa0ba6f0 100644 --- a/crates/axum-utils/Cargo.toml +++ b/crates/axum-utils/Cargo.toml @@ -18,8 +18,8 @@ http = "0.2.8" http-body = "0.4.5" mime = "0.3.16" rand = "0.8.5" -serde = "1.0.140" -serde_with = "1.14.0" +serde = "1.0.141" +serde_with = "2.0.0" serde_urlencoded = "0.7.1" serde_json = "1.0.82" sqlx = "0.6.0" diff --git a/crates/config/Cargo.toml b/crates/config/Cargo.toml index a22e0b6f..40a4e90b 100644 --- a/crates/config/Cargo.toml +++ b/crates/config/Cargo.toml @@ -18,8 +18,8 @@ figment = { version = "0.10.6", features = ["env", "yaml", "test"] } chrono = { version = "0.4.19", features = ["serde"] } url = { version = "2.2.2", features = ["serde"] } -serde = { version = "1.0.140", features = ["derive"] } -serde_with = { version = "1.14.0", features = ["hex", "chrono"] } +serde = { version = "1.0.141", features = ["derive"] } +serde_with = { version = "2.0.0", features = ["hex", "chrono"] } serde_json = "1.0.82" sqlx = { version = "0.6.0", features = ["runtime-tokio-rustls", "postgres"] } lettre = { version = "0.10.1", default-features = false, features = ["serde", "builder"] } diff --git a/crates/data-model/Cargo.toml b/crates/data-model/Cargo.toml index fccb50fb..dc3d3982 100644 --- a/crates/data-model/Cargo.toml +++ b/crates/data-model/Cargo.toml @@ -8,7 +8,7 @@ license = "Apache-2.0" [dependencies] chrono = "0.4.19" thiserror = "1.0.31" -serde = "1.0.140" +serde = "1.0.141" url = { version = "2.2.2", features = ["serde"] } crc = "3.0.0" rand = "0.8.5" diff --git a/crates/handlers/Cargo.toml b/crates/handlers/Cargo.toml index fa2c9625..93d3d3da 100644 --- a/crates/handlers/Cargo.toml +++ b/crates/handlers/Cargo.toml @@ -31,8 +31,8 @@ lettre = { version = "0.10.1", default-features = false, features = ["builder"] sqlx = { version = "0.6.0", features = ["runtime-tokio-rustls", "postgres"] } # Various structure (de)serialization -serde = { version = "1.0.140", features = ["derive"] } -serde_with = { version = "1.14.0", features = ["hex", "chrono"] } +serde = { version = "1.0.141", features = ["derive"] } +serde_with = { version = "2.0.0", features = ["hex", "chrono"] } serde_json = "1.0.82" serde_urlencoded = "0.7.1" diff --git a/crates/http/Cargo.toml b/crates/http/Cargo.toml index 42de29c6..f5e24b46 100644 --- a/crates/http/Cargo.toml +++ b/crates/http/Cargo.toml @@ -19,7 +19,7 @@ opentelemetry = "0.17.0" opentelemetry-http = "0.6.0" opentelemetry-semantic-conventions = "0.9.0" rustls = "0.20.6" -serde = "1.0.140" +serde = "1.0.141" serde_json = "1.0.82" thiserror = "1.0.31" tokio = { version = "1.20.1", features = ["sync", "parking_lot"] } diff --git a/crates/iana-codegen/Cargo.toml b/crates/iana-codegen/Cargo.toml index fd96cb24..7612385f 100644 --- a/crates/iana-codegen/Cargo.toml +++ b/crates/iana-codegen/Cargo.toml @@ -12,7 +12,7 @@ convert_case = "0.5.0" csv = "1.1.6" futures-util = "0.3.21" reqwest = { version = "0.11.11", features = ["blocking", "rustls-tls"], default-features = false } -serde = { version = "1.0.140", features = ["derive"] } +serde = { version = "1.0.141", features = ["derive"] } tokio = { version = "1.20.1", features = ["full"] } tracing = "0.1.36" tracing-subscriber = "0.3.15" diff --git a/crates/iana/Cargo.toml b/crates/iana/Cargo.toml index 82432983..c72bc2ee 100644 --- a/crates/iana/Cargo.toml +++ b/crates/iana/Cargo.toml @@ -6,6 +6,6 @@ edition = "2021" license = "Apache-2.0" [dependencies] -serde = "1.0.140" +serde = "1.0.141" schemars = "0.8.10" parse-display = "0.5.5" diff --git a/crates/jose/Cargo.toml b/crates/jose/Cargo.toml index bcbdb52e..7dca3dae 100644 --- a/crates/jose/Cargo.toml +++ b/crates/jose/Cargo.toml @@ -24,9 +24,9 @@ rand = "0.8.5" rsa = { git = "https://github.com/sandhose/RSA.git", branch = "bump-pkcs" } schemars = "0.8.10" sec1 = "0.3.0" -serde = { version = "1.0.140", features = ["derive"] } +serde = { version = "1.0.141", features = ["derive"] } serde_json = "1.0.82" -serde_with = { version = "1.14.0", features = ["base64"] } +serde_with = { version = "2.0.0", features = ["base64"] } sha2 = "0.10.2" signature = "1.5.0" thiserror = "1.0.31" diff --git a/crates/oauth2-types/Cargo.toml b/crates/oauth2-types/Cargo.toml index 7edd3364..5dda2463 100644 --- a/crates/oauth2-types/Cargo.toml +++ b/crates/oauth2-types/Cargo.toml @@ -7,13 +7,13 @@ license = "Apache-2.0" [dependencies] http = "0.2.8" -serde = "1.0.140" +serde = "1.0.141" serde_json = "1.0.82" language-tags = { version = "0.3.2", features = ["serde"] } url = { version = "2.2.2", features = ["serde"] } parse-display = "0.5.5" indoc = "1.0.6" -serde_with = { version = "1.14.0", features = ["chrono"] } +serde_with = { version = "2.0.0", features = ["chrono"] } chrono = "0.4.19" sha2 = "0.10.2" data-encoding = "2.3.2" diff --git a/crates/oauth2-types/src/requests.rs b/crates/oauth2-types/src/requests.rs index 4c7508df..5bfb153d 100644 --- a/crates/oauth2-types/src/requests.rs +++ b/crates/oauth2-types/src/requests.rs @@ -22,8 +22,8 @@ use mas_iana::oauth::{ use parse_display::{Display, FromStr}; use serde::{Deserialize, Serialize}; use serde_with::{ - rust::StringWithSeparator, serde_as, skip_serializing_none, DisplayFromStr, DurationSeconds, - SpaceSeparator, TimestampSeconds, + formats::SpaceSeparator, serde_as, skip_serializing_none, DisplayFromStr, DurationSeconds, + StringWithSeparator, TimestampSeconds, }; use url::Url; diff --git a/crates/policy/Cargo.toml b/crates/policy/Cargo.toml index 83943b8e..6db3e13d 100644 --- a/crates/policy/Cargo.toml +++ b/crates/policy/Cargo.toml @@ -8,7 +8,7 @@ license = "Apache-2.0" [dependencies] anyhow = "1.0.59" opa-wasm = { git = "https://github.com/matrix-org/rust-opa-wasm.git" } -serde = { version = "1.0.140", features = ["derive"] } +serde = { version = "1.0.141", features = ["derive"] } serde_json = "1.0.82" thiserror = "1.0.31" tokio = { version = "1.20.1", features = ["io-util", "rt"] } diff --git a/crates/router/Cargo.toml b/crates/router/Cargo.toml index 956189ca..48ed54c3 100644 --- a/crates/router/Cargo.toml +++ b/crates/router/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache-2.0" [dependencies] axum = { version = "0.5.13", default-features = false } -serde = { version = "1.0.140", features = ["derive"] } +serde = { version = "1.0.141", features = ["derive"] } serde_urlencoded = "0.7.1" -serde_with = "1.14.0" +serde_with = "2.0.0" url = "2.2.2" diff --git a/crates/router/src/endpoints.rs b/crates/router/src/endpoints.rs index 6950b09d..32f82011 100644 --- a/crates/router/src/endpoints.rs +++ b/crates/router/src/endpoints.rs @@ -13,18 +13,20 @@ // limitations under the License. use serde::{Deserialize, Serialize}; +use serde_with::{serde_as, DisplayFromStr}; pub use crate::traits::*; +#[serde_as] #[derive(Deserialize, Serialize, Clone, Debug)] #[serde(rename_all = "snake_case", tag = "next")] pub enum PostAuthAction { ContinueAuthorizationGrant { - #[serde(deserialize_with = "serde_with::rust::display_fromstr::deserialize")] + #[serde_as(as = "DisplayFromStr")] data: i64, }, ContinueCompatSsoLogin { - #[serde(deserialize_with = "serde_with::rust::display_fromstr::deserialize")] + #[serde_as(as = "DisplayFromStr")] data: i64, }, ChangePassword, diff --git a/crates/storage/Cargo.toml b/crates/storage/Cargo.toml index 39ed494b..5a2a68a8 100644 --- a/crates/storage/Cargo.toml +++ b/crates/storage/Cargo.toml @@ -9,7 +9,7 @@ license = "Apache-2.0" tokio = "1.20.1" sqlx = { version = "0.6.0", features = ["runtime-tokio-rustls", "postgres", "migrate", "chrono", "offline", "json"] } chrono = { version = "0.4.19", features = ["serde"] } -serde = { version = "1.0.140", features = ["derive"] } +serde = { version = "1.0.141", features = ["derive"] } serde_json = "1.0.82" thiserror = "1.0.31" anyhow = "1.0.59" diff --git a/crates/templates/Cargo.toml b/crates/templates/Cargo.toml index 857bca21..e9630a12 100644 --- a/crates/templates/Cargo.toml +++ b/crates/templates/Cargo.toml @@ -16,7 +16,7 @@ anyhow = "1.0.59" thiserror = "1.0.31" tera = "1.16.0" -serde = { version = "1.0.140", features = ["derive"] } +serde = { version = "1.0.141", features = ["derive"] } serde_json = "1.0.82" serde_urlencoded = "0.7.1"