mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
chore: use ready macro from futures-core (#1300)
This commit is contained in:
committed by
Carl Lerche
parent
ca708d6d87
commit
83273b8b50
@@ -28,6 +28,7 @@ tokio-executor = { version = "0.2.0", path = "../tokio-executor" }
|
||||
tokio-io = { version = "0.2.0", path = "../tokio-io" }
|
||||
tokio-sync = { version = "0.2.0", path = "../tokio-sync" }
|
||||
tokio-timer = { version = "0.3.0", path = "../tokio-timer" }
|
||||
futures-core-preview = "0.3.0-alpha.17"
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { path = "../tokio" }
|
||||
|
||||
@@ -20,6 +20,7 @@ use std::task::{self, Poll, Waker};
|
||||
use std::time::{Duration, Instant};
|
||||
use std::{cmp, io};
|
||||
|
||||
use futures_core::ready;
|
||||
use tokio_io::{AsyncRead, AsyncWrite};
|
||||
use tokio_sync::mpsc;
|
||||
use tokio_timer::{clock, timer, Delay};
|
||||
|
||||
@@ -20,15 +20,6 @@
|
||||
//! assert_ready!(fut.poll());
|
||||
//! ```
|
||||
|
||||
macro_rules! ready {
|
||||
($e:expr) => {
|
||||
match $e {
|
||||
::std::task::Poll::Ready(t) => t,
|
||||
::std::task::Poll::Pending => return ::std::task::Poll::Pending,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
pub mod clock;
|
||||
pub mod io;
|
||||
mod macros;
|
||||
|
||||
Reference in New Issue
Block a user