pub fn noop_context() -> Context<'static>
Expand description

Create a new Context where the waker will ignore any uses.

Examples

use futures::future::Future;
use futures::task::Poll;
use futures_test::task::noop_context;
use futures::pin_mut;

let future = async { 5 };
pin_mut!(future);

assert_eq!(future.poll(&mut noop_context()), Poll::Ready(5));