diff --git a/Cargo.toml b/Cargo.toml index 86c6a2200..36a8057d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ members = [ ] [workspace.dependencies] -futures = "0.3.22" +futures = { version = "0.3.22", default-features = false } futures-core = "0.3.22" futures-util = { version = "0.3.22", default-features = false } hdrhistogram = { version = "7.0", default-features = false } diff --git a/tower-service/Cargo.toml b/tower-service/Cargo.toml index 7f9be7399..d1bfd67f6 100644 --- a/tower-service/Cargo.toml +++ b/tower-service/Cargo.toml @@ -25,4 +25,3 @@ edition = "2018" http = { workspace = true } tower-layer = { version = "0.3", path = "../tower-layer" } tokio = { workspace = true, features = ["macros", "time"] } -futures = { workspace = true } diff --git a/tower-service/src/lib.rs b/tower-service/src/lib.rs index 53ab2d647..1d324fc57 100644 --- a/tower-service/src/lib.rs +++ b/tower-service/src/lib.rs @@ -123,7 +123,6 @@ use core::task::{Context, Poll}; /// ```rust /// use tower_service::Service; /// use tower_layer::Layer; -/// use futures::FutureExt; /// use std::future::Future; /// use std::task::{Context, Poll}; /// use std::time::Duration; @@ -332,7 +331,7 @@ pub trait Service { /// If the service is at capacity, then `Poll::Pending` is returned and the task /// is notified when the service becomes ready again. This function is /// expected to be called while on a task. Generally, this can be done with - /// a simple `futures::future::poll_fn` call. + /// a simple [`core::future::poll_fn`] call. /// /// If `Poll::Ready(Err(_))` is returned, the service is no longer able to service requests /// and the caller should discard the service instance. diff --git a/tower/Cargo.toml b/tower/Cargo.toml index 1ffb5e4fe..a258bcb03 100644 --- a/tower/Cargo.toml +++ b/tower/Cargo.toml @@ -74,7 +74,8 @@ pin-project-lite = { workspace = true, optional = true } sync_wrapper = { workspace = true, optional = true } [dev-dependencies] -futures = { workspace = true } +futures = { workspace = true, features = ["std"] } +futures-util = { workspace = true, features = ["async-await-macro"] } hdrhistogram = { workspace = true } tokio = { workspace = true, features = ["macros", "sync", "test-util", "rt-multi-thread"] } tokio-stream = { workspace = true }