Skip to content

Commit

Permalink
reduce futures dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto committed Sep 3, 2024
1 parent e91f37b commit 890fad1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions thirtyfour/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ debug_sync_quit = []
[dependencies]
async-trait = "0.1"
base64 = "0.22"
futures = "0.3.30"
futures-util = { version = "0.3.30", default-features = false }
http = "1"
indexmap = "2"
paste = "1"
Expand Down Expand Up @@ -73,7 +73,7 @@ reqwest = { version = "0.12", default-features = false, features = [
assert_matches = "1.5"
axum = "0.7"
color-eyre = "0.6"
rstest = "0.22.0"
rstest = { version = "0.22.0", default-features = false }
tower-http = { version = "0.5", features = ["fs"] }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tokio = { version = "1", features = ["rt-multi-thread"] }
Expand Down
3 changes: 1 addition & 2 deletions thirtyfour/src/common/types.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use futures::future::BoxFuture;
use futures::FutureExt;
use futures_util::future::{BoxFuture, FutureExt};

Check failure on line 1 in thirtyfour/src/common/types.rs

View workflow job for this annotation

GitHub Actions / check

unresolved import `futures_util::future::BoxFuture`

Check warning on line 1 in thirtyfour/src/common/types.rs

View workflow job for this annotation

GitHub Actions / check

unused import: `FutureExt`
use std::future::Future;
use std::sync::Arc;
use std::{fmt, time::Duration};
Expand Down
4 changes: 2 additions & 2 deletions thirtyfour/src/components/wrapper/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl<T: Clone + 'static> ElementResolver<T> {
mod sealed {
use std::future::Future;

use futures::{StreamExt, TryStreamExt};
use futures_util::{StreamExt, TryStreamExt};

Check warning on line 100 in thirtyfour/src/components/wrapper/resolver.rs

View workflow job for this annotation

GitHub Actions / check

unused import: `TryStreamExt`

use crate::components::Component;
use crate::error::WebDriverResult;
Expand All @@ -121,7 +121,7 @@ mod sealed {

impl<T: Resolve + Sync> Resolve for Vec<T> {
fn is_present(&self) -> impl Future<Output = WebDriverResult<bool>> + Send {
futures::stream::iter(self)
futures_util::stream::iter(self)
.map(Resolve::is_present)
// 16 is arbitrary, just don't send too many requests at the same time
.buffer_unordered(self.len().min(16))

Check failure on line 127 in thirtyfour/src/components/wrapper/resolver.rs

View workflow job for this annotation

GitHub Actions / check

no method named `buffer_unordered` found for struct `Map` in the current scope
Expand Down
2 changes: 1 addition & 1 deletion thirtyfour/src/support.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::error::WebDriverResult;
use base64::{prelude::BASE64_STANDARD, Engine};
use futures::Future;
use std::convert::Infallible;
use std::future::Future;
use std::panic::AssertUnwindSafe;
use std::path::Path;
use std::sync::LazyLock;
Expand Down

0 comments on commit 890fad1

Please sign in to comment.