1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#[macro_export]
macro_rules! try_ready {
($x:expr) => {
match $x {
$crate::core_reexport::task::Poll::Ready(Ok(x)) => x,
$crate::core_reexport::task::Poll::Ready(Err(e)) =>
return $crate::core_reexport::task::Poll::Ready(Err(e.into())),
$crate::core_reexport::task::Poll::Pending =>
return $crate::core_reexport::task::Poll::Pending,
}
}
}
#[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,
})
}