Tweak imports in tests

This commit is contained in:
Taiki Endo
2024-05-03 01:31:55 +09:00
parent f9dd281c28
commit c507ff8337
2 changed files with 3 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
use futures::executor::block_on;
use futures::future::Future;
use futures::future::{self, Future};
use std::task::Poll;
/// This tests verifies (through miri) that self-referencing
@@ -21,7 +21,7 @@ async fn trouble() {
fn yield_now() -> impl Future<Output = ()> {
let mut yielded = false;
std::future::poll_fn(move |cx| {
future::poll_fn(move |cx| {
if core::mem::replace(&mut yielded, true) {
Poll::Ready(())
} else {

View File

@@ -1,8 +1,7 @@
use futures::executor::block_on;
use futures::future::{err, ok, try_join_all, Future, TryJoinAll};
use futures::pin_mut;
use futures_util::future::{err, ok, try_join_all, TryJoinAll};
use std::fmt::Debug;
use std::future::Future;
#[track_caller]
fn assert_done<T>(actual_fut: impl Future<Output = T>, expected: T)