diff options
author | Chih-Hung Hsieh <chh@google.com> | 2020-10-26 21:15:57 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-10-26 21:15:57 +0000 |
commit | d30ac35e100d2a0d593c6543e5322dd4622e3a8d (patch) | |
tree | 4c035f44f5ab63185eba73ee6a2c53d89859f494 /tests/try_join_all.rs | |
parent | 0f433da1774275a3bdc33fdbf312213334d38e3d (diff) | |
parent | a2b749b930f81db8b95730e4f7e1229da59f49a2 (diff) | |
download | futures-d30ac35e100d2a0d593c6543e5322dd4622e3a8d.tar.gz |
Upgrade rust/crates/futures to 0.3.7 am: 32ee67eb39 am: a2b749b930
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/futures/+/1473777
Change-Id: I28750111e2a77d1ce199348c2fcb64a12ae2f28f
Diffstat (limited to 'tests/try_join_all.rs')
-rw-r--r-- | tests/try_join_all.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/try_join_all.rs b/tests/try_join_all.rs index 1097a36..3de679b 100644 --- a/tests/try_join_all.rs +++ b/tests/try_join_all.rs @@ -1,4 +1,3 @@ -#[cfg(feature = "executor")] // executor:: mod util { use std::future::Future; use futures::executor::block_on; @@ -14,7 +13,6 @@ mod util { } } -#[cfg(feature = "executor")] // assert_done #[test] fn collect_collects() { use futures_util::future::{err, ok, try_join_all}; @@ -30,7 +28,6 @@ fn collect_collects() { // TODO: needs more tests } -#[cfg(feature = "executor")] // assert_done #[test] fn try_join_all_iter_lifetime() { use futures_util::future::{ok, try_join_all}; @@ -40,7 +37,7 @@ fn try_join_all_iter_lifetime() { // In futures-rs version 0.1, this function would fail to typecheck due to an overly // conservative type parameterization of `TryJoinAll`. - fn sizes<'a>(bufs: Vec<&'a [u8]>) -> Box<dyn Future<Output = Result<Vec<usize>, ()>> + Unpin> { + fn sizes(bufs: Vec<&[u8]>) -> Box<dyn Future<Output = Result<Vec<usize>, ()>> + Unpin> { let iter = bufs.into_iter().map(|b| ok::<usize, ()>(b.len())); Box::new(try_join_all(iter)) } @@ -48,7 +45,6 @@ fn try_join_all_iter_lifetime() { assert_done(|| sizes(vec![&[1,2,3], &[], &[0]]), Ok(vec![3 as usize, 0, 1])); } -#[cfg(feature = "executor")] // assert_done #[test] fn try_join_all_from_iter() { use futures_util::future::{ok, TryJoinAll}; |