Skip to content

Commit

Permalink
replace futures with futures-util
Browse files Browse the repository at this point in the history
This slightly reduces depedency tree.
  • Loading branch information
mati865 authored and la10736 committed Dec 5, 2024
1 parent 88f9c2e commit 9a78bfb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions rstest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ version = "0.24.0-dev"

[features]
async-timeout = [
"dep:futures",
"dep:futures-timer",
"dep:futures-util",
"rstest_macros/async-timeout",
]
crate-name = ["rstest_macros/crate-name"]
Expand All @@ -27,8 +27,8 @@ default = ["async-timeout", "crate-name"]
[lib]

[dependencies]
futures = { version = "0.3.30", optional = true }
futures-timer = { version = "3.0.3", optional = true }
futures-util = { version = "0.3.30", optional = true }
rstest_macros = { version = "0.24.0-dev", path = "../rstest_macros", default-features = false }

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions rstest/src/timeout.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use std::{sync::mpsc, thread, time::Duration};

#[cfg(feature = "async-timeout")]
use futures::{select, Future, FutureExt};
#[cfg(feature = "async-timeout")]
use futures_timer::Delay;
#[cfg(feature = "async-timeout")]
use futures_util::{select, Future, FutureExt};

pub fn execute_with_timeout_sync<T: 'static + Send, F: FnOnce() -> T + Send + 'static>(
code: F,
Expand Down

0 comments on commit 9a78bfb

Please sign in to comment.