[−][src]Function futures_test::task::noop_context
pub fn noop_context() -> Context<'static>
Create a new task::Context
where the
waker and
spawner will both ignore any
uses.
Examples
#![feature(async_await, futures_api, pin)] use futures::future::Future; use futures::task::Poll; use futures_test::task::noop_context; use pin_utils::pin_mut; let mut future = async { 5 }; pin_mut!(future); assert_eq!(future.poll(&mut noop_context()), Poll::Ready(5));