From a4517c5286cedcf29d7a11eeab2bf7a166ede4df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Miku=C5=82a?= Date: Wed, 4 Dec 2024 21:54:58 +0100 Subject: [PATCH] replace futures with futures-util This slightly reduces depedency tree. --- rstest/Cargo.toml | 4 ++-- rstest/src/timeout.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rstest/Cargo.toml b/rstest/Cargo.toml index 29ecb3fd..3a31938e 100644 --- a/rstest/Cargo.toml +++ b/rstest/Cargo.toml @@ -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"] @@ -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] diff --git a/rstest/src/timeout.rs b/rstest/src/timeout.rs index 011e3a41..07425e77 100644 --- a/rstest/src/timeout.rs +++ b/rstest/src/timeout.rs @@ -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 + Send + 'static>( code: F,