Skip to content

Commit 9ae3128

Browse files
committed
chore: Disable unused futures feature
1 parent 21e01e9 commit 9ae3128

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ members = [
88
]
99

1010
[workspace.dependencies]
11-
futures = "0.3.22"
11+
futures = { version = "0.3.22", default-features = false }
1212
futures-core = "0.3.22"
1313
futures-util = { version = "0.3.22", default-features = false }
1414
hdrhistogram = { version = "7.0", default-features = false }

tower-service/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,3 @@ edition = "2018"
2525
http = { workspace = true }
2626
tower-layer = { version = "0.3", path = "../tower-layer" }
2727
tokio = { workspace = true, features = ["macros", "time"] }
28-
futures = { workspace = true }

tower-service/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717

1818
extern crate alloc;
1919

20+
#[cfg(doc)]
21+
extern crate std;
22+
2023
use alloc::boxed::Box;
2124

2225
use core::future::Future;
@@ -123,7 +126,6 @@ use core::task::{Context, Poll};
123126
/// ```rust
124127
/// use tower_service::Service;
125128
/// use tower_layer::Layer;
126-
/// use futures::FutureExt;
127129
/// use std::future::Future;
128130
/// use std::task::{Context, Poll};
129131
/// use std::time::Duration;
@@ -332,7 +334,7 @@ pub trait Service<Request> {
332334
/// If the service is at capacity, then `Poll::Pending` is returned and the task
333335
/// is notified when the service becomes ready again. This function is
334336
/// expected to be called while on a task. Generally, this can be done with
335-
/// a simple `futures::future::poll_fn` call.
337+
/// a simple [`std::future::poll_fn`] call.
336338
///
337339
/// If `Poll::Ready(Err(_))` is returned, the service is no longer able to service requests
338340
/// and the caller should discard the service instance.

tower/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ pin-project-lite = { workspace = true, optional = true }
7474
sync_wrapper = { workspace = true, optional = true }
7575

7676
[dev-dependencies]
77-
futures = { workspace = true }
77+
futures = { workspace = true, features = ["std"] }
78+
futures-util = { workspace = true, features = ["async-await-macro"] }
7879
hdrhistogram = { workspace = true }
7980
tokio = { workspace = true, features = ["macros", "sync", "test-util", "rt-multi-thread"] }
8081
tokio-stream = { workspace = true }

0 commit comments

Comments
 (0)