| 1 | /// Extracts the successful type of a `Poll<T>`. |
|---|---|
| 2 | /// |
| 3 | /// This macro bakes in propagation of `Pending` signals by returning early. |
| 4 | #[macro_export] |
| 5 | macro_rules! ready { |
| 6 | ($e:expr $(,)?) => { |
| 7 | match $e { |
| 8 | $crate::task::Poll::Ready(t) => t, |
| 9 | $crate::task::Poll::Pending => return $crate::task::Poll::Pending, |
| 10 | } |
| 11 | }; |
| 12 | } |
| 13 |
