diff options
author | Gurwinder Singh <vargwin@gmail.com> | 2019-07-15 23:13:54 +0530 |
---|---|---|
committer | Carl Lerche <me@carllerche.com> | 2019-07-15 10:43:54 -0700 |
commit | 83273b8b50fd4e7a68c83f9086e2f1bd513174d7 (patch) | |
tree | 904db56e391293e4ddf40e326a514ddb98d7b7c4 /tokio-test | |
parent | ca708d6d8783b4fc86ccc059fb7a40e14edfe812 (diff) |
chore: use ready macro from `futures-core` (#1300)
Diffstat (limited to 'tokio-test')
-rw-r--r-- | tokio-test/Cargo.toml | 1 | ||||
-rw-r--r-- | tokio-test/src/io.rs | 1 | ||||
-rw-r--r-- | tokio-test/src/lib.rs | 9 |
3 files changed, 2 insertions, 9 deletions
diff --git a/tokio-test/Cargo.toml b/tokio-test/Cargo.toml index 95e94896..92573a83 100644 --- a/tokio-test/Cargo.toml +++ b/tokio-test/Cargo.toml @@ -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" } diff --git a/tokio-test/src/io.rs b/tokio-test/src/io.rs index 568a81fc..881ffe1a 100644 --- a/tokio-test/src/io.rs +++ b/tokio-test/src/io.rs @@ -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}; diff --git a/tokio-test/src/lib.rs b/tokio-test/src/lib.rs index 00d38897..7cfd428c 100644 --- a/tokio-test/src/lib.rs +++ b/tokio-test/src/lib.rs @@ -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; |