Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use futures-util #403

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions s3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ base64 = "0.22"
block_on_proc = { version = "0.2", optional = true }
bytes = { version = "1.2" }
cfg-if = "1"
futures = { version = "0.3", optional = true, default-features = false }
futures-util = { version = "0.3", optional = true, default-features = false, features = ["alloc"] }
hex = "0.4"
hmac = "0.12"
http = "1"
Expand Down Expand Up @@ -85,8 +85,8 @@ default = ["fail-on-err", "tags", "tokio-native-tls"]

sync = ["attohttpc", "maybe-async/is_sync"]
with-async-std-hyper = ["with-async-std", "surf/hyper-client"]
with-async-std = ["async-std", "futures"]
with-tokio = ["futures", "reqwest", "tokio", "tokio/fs", "tokio-stream"]
with-async-std = ["async-std", "dep:futures-util"]
with-tokio = ["dep:futures-util", "reqwest", "tokio", "tokio/fs", "tokio-stream"]

blocking = ["block_on_proc", "tokio/rt", "tokio/rt-multi-thread"]
fail-on-err = []
Expand Down
4 changes: 2 additions & 2 deletions s3/src/bucket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ impl Bucket {
}

// Wait for all chunks to finish (or fail)
let responses = futures::future::join_all(handles).await;
let responses = futures_util::future::join_all(handles).await;

for response in responses {
let response_data = response?;
Expand Down Expand Up @@ -3015,7 +3015,7 @@ mod test {
#[cfg(feature = "with-async-std")]
use async_std::stream::StreamExt;
#[cfg(feature = "with-tokio")]
use futures::StreamExt;
use futures_util::stream::StreamExt;
#[cfg(not(any(feature = "with-tokio", feature = "with-async-std")))]
use std::fs::File;
#[cfg(not(any(feature = "with-tokio", feature = "with-async-std")))]
Expand Down
2 changes: 1 addition & 1 deletion s3/src/request/async_std_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use async_std::io::Write as AsyncWrite;
use async_std::io::{ReadExt, WriteExt};
use async_std::stream::StreamExt;
use bytes::Bytes;
use futures::FutureExt;
use futures_util::future::FutureExt;
use std::collections::HashMap;

use crate::bucket::Bucket;
Expand Down
2 changes: 1 addition & 1 deletion s3/src/request/tokio_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ extern crate base64;
extern crate md5;

use bytes::Bytes;
use futures::TryStreamExt;
use futures_util::stream::TryStreamExt;
use maybe_async::maybe_async;
use std::collections::HashMap;
use std::str::FromStr as _;
Expand Down
Loading