From 7b86acb71d11664f64104854ea69d41d9772786e Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Fri, 5 Jul 2019 06:34:57 +0900 Subject: [PATCH] chore: Update futures-preview to 0.3.0-alpha.17 (#1267) --- tokio-codec/Cargo.toml | 4 ++-- tokio-codec/tests/framed.rs | 3 ++- tokio-futures/Cargo.toml | 2 +- tokio-futures/src/lib.rs | 4 ++-- tokio-futures/src/macros.rs | 12 ------------ tokio-signal/Cargo.toml | 4 ++-- tokio-sync/Cargo.toml | 2 +- tokio-tcp/Cargo.toml | 2 +- tokio-timer/Cargo.toml | 2 +- 9 files changed, 12 insertions(+), 23 deletions(-) delete mode 100644 tokio-futures/src/macros.rs diff --git a/tokio-codec/Cargo.toml b/tokio-codec/Cargo.toml index e34e7b2e0..957d8cf90 100644 --- a/tokio-codec/Cargo.toml +++ b/tokio-codec/Cargo.toml @@ -28,6 +28,6 @@ tokio-futures = { version = "0.2.0", path = "../tokio-futures" } log = "0.4" [dev-dependencies] -futures-preview = "0.3.0-alpha.16" +futures-preview = "0.3.0-alpha.17" tokio-current-thread = { version = "0.2.0", path = "../tokio-current-thread" } -tokio-test = { version = "0.2.0", path = "../tokio-test" } \ No newline at end of file +tokio-test = { version = "0.2.0", path = "../tokio-test" } diff --git a/tokio-codec/tests/framed.rs b/tokio-codec/tests/framed.rs index 97f01228c..ec5bb5a5f 100644 --- a/tokio-codec/tests/framed.rs +++ b/tokio-codec/tests/framed.rs @@ -9,7 +9,8 @@ use tokio_current_thread::block_on_all; use tokio_io::AsyncRead; use bytes::{Buf, BufMut, BytesMut, IntoBuf}; -use futures::prelude::{FutureExt, StreamExt}; +use futures::future::FutureExt; +use futures::stream::StreamExt; const INITIAL_CAPACITY: usize = 8 * 1024; diff --git a/tokio-futures/Cargo.toml b/tokio-futures/Cargo.toml index ad8247116..7fbe140e9 100644 --- a/tokio-futures/Cargo.toml +++ b/tokio-futures/Cargo.toml @@ -23,4 +23,4 @@ default = [ ] [dependencies] -futures-core-preview = "0.3.0-alpha.16" +futures-core-preview = "0.3.0-alpha.17" diff --git a/tokio-futures/src/lib.rs b/tokio-futures/src/lib.rs index c6c3afa25..ba25e227c 100644 --- a/tokio-futures/src/lib.rs +++ b/tokio-futures/src/lib.rs @@ -9,8 +9,8 @@ pub mod future; pub mod sink; pub mod stream; -mod macros; - pub use crate::future::Future; pub use crate::sink::Sink; pub use crate::stream::Stream; + +pub use futures_core::ready; diff --git a/tokio-futures/src/macros.rs b/tokio-futures/src/macros.rs deleted file mode 100644 index 30505ef1c..000000000 --- a/tokio-futures/src/macros.rs +++ /dev/null @@ -1,12 +0,0 @@ -/// 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, - } - }}; -} diff --git a/tokio-signal/Cargo.toml b/tokio-signal/Cargo.toml index 4829f8687..2c17e159a 100644 --- a/tokio-signal/Cargo.toml +++ b/tokio-signal/Cargo.toml @@ -26,8 +26,8 @@ travis-ci = { repository = "tokio-rs/tokio" } appveyor = { repository = "carllerche/tokio", id = "s83yxhy9qeb58va7" } [dependencies] -futures-core-preview = "0.3.0-alpha.16" -futures-util-preview = "0.3.0-alpha.16" +futures-core-preview = "0.3.0-alpha.17" +futures-util-preview = "0.3.0-alpha.17" lazy_static = "1" tokio-reactor = { version = "0.2.0", path = "../tokio-reactor" } tokio-executor = { version = "0.2.0", path = "../tokio-executor" } diff --git a/tokio-sync/Cargo.toml b/tokio-sync/Cargo.toml index 154c66011..d8b5ebd83 100644 --- a/tokio-sync/Cargo.toml +++ b/tokio-sync/Cargo.toml @@ -28,7 +28,7 @@ async-traits = ["async-sink", "futures-core-preview"] async-util = { git = "https://github.com/tokio-rs/async" } async-sink = { git = "https://github.com/tokio-rs/async", optional = true } fnv = "1.0.6" -futures-core-preview = { version = "0.3.0-alpha.16", optional = true } +futures-core-preview = { version = "0.3.0-alpha.17", optional = true } [dev-dependencies] env_logger = { version = "0.5", default-features = false } diff --git a/tokio-tcp/Cargo.toml b/tokio-tcp/Cargo.toml index ef99c6b7e..2bb387d92 100644 --- a/tokio-tcp/Cargo.toml +++ b/tokio-tcp/Cargo.toml @@ -33,7 +33,7 @@ mio = "0.6.14" iovec = "0.1" # optionals -futures-core-preview = { version = "0.3.0-alpha.16", optional = true } +futures-core-preview = { version = "0.3.0-alpha.17", optional = true } [dev-dependencies] #env_logger = { version = "0.5", default-features = false } diff --git a/tokio-timer/Cargo.toml b/tokio-timer/Cargo.toml index 717b6cdb0..3bcd1549d 100644 --- a/tokio-timer/Cargo.toml +++ b/tokio-timer/Cargo.toml @@ -33,7 +33,7 @@ crossbeam-utils = "0.6.0" # Backs `DelayQueue` slab = "0.4.1" # optionals -futures-core-preview = { version = "0.3.0-alpha.16", optional = true } +futures-core-preview = { version = "0.3.0-alpha.17", optional = true } [dev-dependencies] rand = "0.6"