Debian Codegraph @

debian/rust-vendor/futures-core/src/task/poll.rs

raw
1 /// Extracts the successful type of `Poll<T>`.
2 ///
3 /// This macro bakes in propagation of `Pending` signals by returning early.
4 ///
5 /// **Note:** Since Rust 1.64, this macro is soft-deprecated in favor of
6 /// [`ready!`](core::task::ready) macro in the standard library.
7 #[macro_export]
8 macro_rules! ready {
9 ($e:expr $(,)?) => {
10 match $e {
11 $crate::task::Poll::Ready(t) => t,
12 $crate::task::Poll::Pending => return $crate::task::Poll::Pending,
13 }
14 };
15 }