blob: fc61683e76c07097ae1b34c363d6c13656fdb6f4 [file] [log] [blame]
/// Extracts the successful type of a `Poll<T>`.
///
/// This macro bakes in propagation of `Pending` signals by returning early.
#[macro_export]
macro_rules! ready {
($e:expr $(,)?) => (match $e {
$crate::core_reexport::task::Poll::Ready(t) => t,
$crate::core_reexport::task::Poll::Pending =>
return $crate::core_reexport::task::Poll::Pending,
})
}