You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
364 B

use futures::future::{self, FutureExt};
use futures::task::Context;
use futures_test::task::panic_waker;
#[test]
fn fuse() {
let mut future = future::ready::<i32>(2).fuse();
let waker = panic_waker();
let mut cx = Context::from_waker(&waker);
assert!(future.poll_unpin(&mut cx).is_ready());
assert!(future.poll_unpin(&mut cx).is_pending());
}