From f286933bec64edd7862186ebe7354120b3c71e63 Mon Sep 17 00:00:00 2001 From: tottoto Date: Sun, 21 Jul 2024 01:31:24 +0900 Subject: [PATCH 1/4] chore: Remove unmatched deny ignore config (#733) Co-authored-by: Toby Lawrence --- deny.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/deny.toml b/deny.toml index 83988ef34..111567196 100644 --- a/deny.toml +++ b/deny.toml @@ -2,7 +2,6 @@ vulnerability = "deny" unmaintained = "warn" notice = "warn" -ignore = ["RUSTSEC-2020-0159"] [licenses] unlicensed = "deny" From 7d723eb2faa7ee98ca251db972146a1f545742bb Mon Sep 17 00:00:00 2001 From: Glen De Cauwsemaecker Date: Sat, 20 Jul 2024 18:42:34 +0200 Subject: [PATCH 2/4] remove generic parameters from Reconnect::new (#755) these were not used, as the only parameters used come from the impl block (directly and indirectly) Co-authored-by: Toby Lawrence --- tower/src/reconnect/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tower/src/reconnect/mod.rs b/tower/src/reconnect/mod.rs index ff354821c..d9a96b233 100644 --- a/tower/src/reconnect/mod.rs +++ b/tower/src/reconnect/mod.rs @@ -49,7 +49,7 @@ where M: Service, { /// Lazily connect and reconnect to a [`Service`]. - pub fn new(mk_service: M, target: Target) -> Self { + pub fn new(mk_service: M, target: Target) -> Self { Reconnect { mk_service, state: State::Idle, From 05a0a25dcc9f3de50c13c5259985cd2fb38355e5 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Sat, 20 Jul 2024 10:01:30 -0700 Subject: [PATCH 3/4] Upgrade to indexmap v2 (MSRV 1.63) (#741) Co-authored-by: Toby Lawrence --- .github/workflows/CI.yml | 2 +- README.md | 2 +- tower/Cargo.toml | 4 ++-- tower/README.md | 2 +- tower/src/lib.rs | 2 +- tower/src/ready_cache/cache.rs | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c60296707..9d1679d50 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,7 +7,7 @@ on: pull_request: {} env: - MSRV: 1.49.0 + MSRV: 1.63.0 jobs: check-stable: diff --git a/README.md b/README.md index 31a2357a9..a0716a42f 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ pattern. If your protocol is entirely stream based, Tower may not be a good fit. Tower will keep a rolling MSRV (minimum supported Rust version) policy of **at least** 6 months. When increasing the MSRV, the new Rust version must have been -released at least six months ago. The current MSRV is 1.49.0. +released at least six months ago. The current MSRV is 1.63.0. ## Getting Started diff --git a/tower/Cargo.toml b/tower/Cargo.toml index 96269dc80..3e199a844 100644 --- a/tower/Cargo.toml +++ b/tower/Cargo.toml @@ -20,7 +20,7 @@ clients and servers. categories = ["asynchronous", "network-programming"] keywords = ["io", "async", "non-blocking", "futures", "service"] edition = "2018" -rust-version = "1.49.0" +rust-version = "1.63.0" [features] @@ -71,7 +71,7 @@ tower-service = { version = "0.3.1", path = "../tower-service" } futures-core = { version = "0.3", optional = true } futures-util = { version = "0.3", default-features = false, features = ["alloc"], optional = true } hdrhistogram = { version = "7.0", optional = true, default-features = false } -indexmap = { version = "1.0.2", optional = true } +indexmap = { version = "2.0.2", optional = true } slab = { version = "0.4", optional = true } tokio = { version = "1.6", optional = true, features = ["sync"] } tokio-stream = { version = "0.1.0", optional = true } diff --git a/tower/README.md b/tower/README.md index f5bc7d01e..b277f7433 100644 --- a/tower/README.md +++ b/tower/README.md @@ -174,7 +174,7 @@ Tower. Tower will keep a rolling MSRV (minimum supported Rust version) policy of **at least** 6 months. When increasing the MSRV, the new Rust version must have been -released at least six months ago. The current MSRV is 1.49.0. +released at least six months ago. The current MSRV is 1.63.0. ## License diff --git a/tower/src/lib.rs b/tower/src/lib.rs index 073fd016f..cce43c9e9 100644 --- a/tower/src/lib.rs +++ b/tower/src/lib.rs @@ -144,7 +144,7 @@ //! //! Tower will keep a rolling MSRV (minimum supported Rust version) policy of **at //! least** 6 months. When increasing the MSRV, the new Rust version must have been -//! released at least six months ago. The current MSRV is 1.49.0. +//! released at least six months ago. The current MSRV is 1.63.0. //! //! [`Service`]: crate::Service //! [`Layer`]: crate::Layer diff --git a/tower/src/ready_cache/cache.rs b/tower/src/ready_cache/cache.rs index 282f2bb83..304047881 100644 --- a/tower/src/ready_cache/cache.rs +++ b/tower/src/ready_cache/cache.rs @@ -193,7 +193,7 @@ where } /// Obtains a mutable reference to a service in the ready set by index. - pub fn get_ready_index_mut(&mut self, idx: usize) -> Option<(&mut K, &mut S)> { + pub fn get_ready_index_mut(&mut self, idx: usize) -> Option<(&K, &mut S)> { self.ready.get_index_mut(idx).map(|(k, v)| (k, &mut v.0)) } From 032d17f68931261eb84c76280fb3068773d5e8d7 Mon Sep 17 00:00:00 2001 From: Glen De Cauwsemaecker Date: Sat, 20 Jul 2024 19:11:02 +0200 Subject: [PATCH 4/4] ensure that re-exported symbols show feature label in root (#754) Co-authored-by: Toby Lawrence --- tower/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tower/src/lib.rs b/tower/src/lib.rs index cce43c9e9..a509b89cb 100644 --- a/tower/src/lib.rs +++ b/tower/src/lib.rs @@ -202,15 +202,20 @@ pub mod layer; #[cfg(feature = "util")] #[doc(inline)] +#[cfg_attr(docsrs, doc(cfg(feature = "util")))] pub use self::util::{service_fn, ServiceExt}; #[doc(inline)] pub use crate::builder::ServiceBuilder; + #[cfg(feature = "make")] #[doc(inline)] +#[cfg_attr(docsrs, doc(cfg(feature = "make")))] pub use crate::make::MakeService; + #[doc(inline)] pub use tower_layer::Layer; + #[doc(inline)] pub use tower_service::Service;