summaryrefslogtreecommitdiffstats
path: root/tokio/src/macros/ready.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tokio/src/macros/ready.rs')
-rw-r--r--tokio/src/macros/ready.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tokio/src/macros/ready.rs b/tokio/src/macros/ready.rs
new file mode 100644
index 00000000..1f48623b
--- /dev/null
+++ b/tokio/src/macros/ready.rs
@@ -0,0 +1,8 @@
+macro_rules! ready {
+ ($e:expr $(,)?) => {
+ match $e {
+ std::task::Poll::Ready(t) => t,
+ std::task::Poll::Pending => return std::task::Poll::Pending,
+ }
+ };
+}