mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-09 00:00:08 +02:00
chore: use ready macro from futures-core (#1300)
This commit is contained in:
committed by
Carl Lerche
parent
ca708d6d87
commit
83273b8b50
@@ -1,19 +1,6 @@
|
||||
#![deny(warnings, rust_2018_idioms)]
|
||||
#![feature(async_await)]
|
||||
|
||||
/// Unwrap a ready value or propagate `Async::Pending`.
|
||||
#[macro_export]
|
||||
macro_rules! ready {
|
||||
($e:expr) => {{
|
||||
use std::task::Poll::{Pending, Ready};
|
||||
|
||||
match $e {
|
||||
Ready(v) => v,
|
||||
Pending => return Pending,
|
||||
}
|
||||
}};
|
||||
}
|
||||
|
||||
#[path = "../src/oneshot.rs"]
|
||||
#[allow(warnings)]
|
||||
mod oneshot;
|
||||
|
||||
Reference in New Issue
Block a user