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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#[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! try_poll {
($x:expr) => {
match $x {
$crate::core_reexport::task::Poll::Ready(Ok(x)) =>
$crate::core_reexport::task::Poll::Ready(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 =>
$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,
})
}