diff --git a/Cargo.lock b/Cargo.lock index 1cc158f..8b62c43 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4196,16 +4196,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "idna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.5.0" @@ -4216,12 +4206,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "if_chain" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" - [[package]] name = "ignore" version = "0.4.20" @@ -4975,7 +4959,7 @@ dependencies = [ "env_logger", "futures-util", "log", - "pin-project", + "pin-project-lite 0.2.13", ] [[package]] @@ -9121,12 +9105,12 @@ dependencies = [ [[package]] name = "validator" -version = "0.16.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b92f40481c04ff1f4f61f304d61793c7b56ff76ac1469f1beb199b1445b253bd" +checksum = "db79c75af171630a3148bd3e6d7c4f42b6a9a014c2945bc5ed0020cbb8d9478e" dependencies = [ - "idna 0.4.0", - "lazy_static", + "idna 0.5.0", + "once_cell", "regex", "serde", "serde_derive", @@ -9137,28 +9121,16 @@ dependencies = [ [[package]] name = "validator_derive" -version = "0.16.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc44ca3088bb3ba384d9aecf40c6a23a676ce23e09bdaca2073d99c207f864af" +checksum = "55591299b7007f551ed1eb79a684af7672c19c3193fb9e0a31936987bb2438ec" dependencies = [ - "if_chain", - "lazy_static", + "darling 0.20.3", + "once_cell", "proc-macro-error", "proc-macro2", "quote", - "regex", - "syn 1.0.109", - "validator_types", -] - -[[package]] -name = "validator_types" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111abfe30072511849c5910134e8baf8dc05de4c0e5903d681cbd5c9c4d611e3" -dependencies = [ - "proc-macro2", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index e3a8531..0c0498e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -104,6 +104,8 @@ color-eyre = "0.6" futures-util = { version = "0.3.17", default-features = false, features = ["std"] } log = "0.4" openssl = { version = "0.10.60", features = ["v110"] } +parking_lot = "0.12" +pin-project-lite = "0.2" rand = "0.8" rustls = "0.23" rustls-pemfile = "2" diff --git a/databases/diesel/Cargo.toml b/databases/diesel/Cargo.toml index d923840..bf294e4 100644 --- a/databases/diesel/Cargo.toml +++ b/databases/diesel/Cargo.toml @@ -9,5 +9,5 @@ diesel = { version = "2", features = ["sqlite", "r2d2", "uuid"] } dotenvy.workspace = true env_logger.workspace = true log.workspace = true -serde = { version = "1.0", features = ["derive"] } +serde.workspace = true uuid.workspace = true diff --git a/databases/postgres/Cargo.toml b/databases/postgres/Cargo.toml index c277a53..3fab108 100644 --- a/databases/postgres/Cargo.toml +++ b/databases/postgres/Cargo.toml @@ -9,7 +9,7 @@ config = "0.13" deadpool-postgres = { version = "0.12", features = ["serde"] } derive_more.workspace = true dotenvy.workspace = true -serde = { version = "1.0.137", features = ["derive"] } +serde.workspace = true tokio-pg-mapper = "0.2.0" tokio-pg-mapper-derive = "0.2.0" tokio-postgres = "0.7.6" diff --git a/https-tls/cert-watch/Cargo.toml b/https-tls/cert-watch/Cargo.toml index 614a82c..6009fd2 100644 --- a/https-tls/cert-watch/Cargo.toml +++ b/https-tls/cert-watch/Cargo.toml @@ -15,4 +15,4 @@ notify = "6" rustls.workspace = true rustls-pemfile.workspace = true tokio = { workspace = true, features = ["time", "rt", "macros"] } -parking_lot = "0.12" +parking_lot.workspace = true diff --git a/json/json-error/Cargo.toml b/json/json-error/Cargo.toml index 0bd2006..4e7d3b1 100644 --- a/json/json-error/Cargo.toml +++ b/json/json-error/Cargo.toml @@ -8,5 +8,5 @@ actix-web.workspace = true env_logger.workspace = true log.workspace = true -serde = { version = "1.0", features = ["derive"] } +serde.workspace = true serde_json.workspace = true diff --git a/json/json-validation/Cargo.toml b/json/json-validation/Cargo.toml index 240d012..c033f94 100644 --- a/json/json-validation/Cargo.toml +++ b/json/json-validation/Cargo.toml @@ -12,4 +12,4 @@ futures-util.workspace = true log.workspace = true serde.workspace = true serde_json.workspace = true -validator = { version = "0.16", features = ["derive"] } +validator = { version = "0.18", features = ["derive"] } diff --git a/json/json/Cargo.toml b/json/json/Cargo.toml index 0b427b7..729b1df 100644 --- a/json/json/Cargo.toml +++ b/json/json/Cargo.toml @@ -7,5 +7,5 @@ edition = "2021" actix-web.workspace = true env_logger.workspace = true log.workspace = true -serde = { version = "1.0", features = ["derive"] } +serde.workspace = true serde_json.workspace = true diff --git a/json/jsonrpc/Cargo.toml b/json/jsonrpc/Cargo.toml index 239e6a7..831f052 100644 --- a/json/jsonrpc/Cargo.toml +++ b/json/jsonrpc/Cargo.toml @@ -10,5 +10,5 @@ bytes = "1.1.0" env_logger.workspace = true futures-util.workspace = true log.workspace = true -serde = { version = "1.0", features = ["derive"] } +serde.workspace = true serde_json.workspace = true diff --git a/middleware/various/Cargo.toml b/middleware/various/Cargo.toml index 6ff7fee..88ec25a 100644 --- a/middleware/various/Cargo.toml +++ b/middleware/various/Cargo.toml @@ -12,4 +12,4 @@ actix-web-lab.workspace = true env_logger.workspace = true futures-util.workspace = true log.workspace = true -pin-project = "1" +pin-project-lite.workspace = true diff --git a/middleware/various/src/read_response_body.rs b/middleware/various/src/read_response_body.rs index 5607dbe..af840c8 100644 --- a/middleware/various/src/read_response_body.rs +++ b/middleware/various/src/read_response_body.rs @@ -11,6 +11,7 @@ use actix_web::{ web::{Bytes, BytesMut}, Error, }; +use pin_project_lite::pin_project; pub struct Logging; @@ -53,15 +54,16 @@ where } } -#[pin_project::pin_project] -pub struct WrapperStream -where - B: MessageBody, - S: Service, -{ - #[pin] - fut: S::Future, - _t: PhantomData<(B,)>, +pin_project! { + pub struct WrapperStream + where + B: MessageBody, + S: Service, + { + #[pin] + fut: S::Future, + _t: PhantomData<(B,)>, + } } impl Future for WrapperStream @@ -83,17 +85,17 @@ where } } -#[pin_project::pin_project(PinnedDrop)] -pub struct BodyLogger { - #[pin] - body: B, - body_accum: BytesMut, -} +pin_project! { + pub struct BodyLogger { + #[pin] + body: B, + body_accum: BytesMut, + } -#[pin_project::pinned_drop] -impl PinnedDrop for BodyLogger { - fn drop(self: Pin<&mut Self>) { - println!("response body: {:?}", self.body_accum); + impl PinnedDrop for BodyLogger { + fn drop(this: Pin<&mut Self>) { + println!("response body: {:?}", this.body_accum); + } } } diff --git a/server-sent-events/Cargo.toml b/server-sent-events/Cargo.toml index e574f2d..258baa9 100644 --- a/server-sent-events/Cargo.toml +++ b/server-sent-events/Cargo.toml @@ -9,6 +9,6 @@ actix-web-lab.workspace = true env_logger.workspace = true futures-util.workspace = true log.workspace = true -parking_lot = "0.12" +parking_lot.workspace = true tokio = { workspace = true, features = ["sync"] } tokio-stream.workspace = true diff --git a/shutdown-server/Cargo.toml b/shutdown-server/Cargo.toml index acf7999..d097168 100644 --- a/shutdown-server/Cargo.toml +++ b/shutdown-server/Cargo.toml @@ -10,4 +10,4 @@ actix-web-lab.workspace = true env_logger.workspace = true log.workspace = true -parking_lot = "0.12" +parking_lot.workspace = true