diff options
-rw-r--r-- | examples/Cargo.toml | 2 | ||||
-rw-r--r-- | examples/chat.rs | 4 | ||||
-rw-r--r-- | examples/connect.rs | 20 | ||||
-rw-r--r-- | tests-integration/Cargo.toml | 2 | ||||
-rw-r--r-- | tokio-test/Cargo.toml | 4 | ||||
-rw-r--r-- | tokio-tls/Cargo.toml | 2 | ||||
-rw-r--r-- | tokio-util/Cargo.toml | 6 | ||||
-rw-r--r-- | tokio-util/src/codec/mod.rs | 4 | ||||
-rw-r--r-- | tokio-util/tests/udp.rs | 2 | ||||
-rw-r--r-- | tokio/Cargo.toml | 10 | ||||
-rw-r--r-- | tokio/src/process/mod.rs | 2 | ||||
-rw-r--r-- | tokio/tests/fs_dir.rs | 2 |
12 files changed, 31 insertions, 29 deletions
diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 84a546f7..782a16cb 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -9,7 +9,7 @@ tokio = { version = "=0.2.0-alpha.6", path = "../tokio" } tokio-util = { version = "=0.2.0-alpha.6", path = "../tokio-util" } bytes = "0.4.12" -futures-preview = "=0.3.0-alpha.19" +futures = "0.3.0" [[example]] name = "chat" diff --git a/examples/chat.rs b/examples/chat.rs index 0a3976d5..e0213afd 100644 --- a/examples/chat.rs +++ b/examples/chat.rs @@ -30,7 +30,7 @@ use tokio::net::{TcpListener, TcpStream}; use tokio::sync::{mpsc, Mutex}; use tokio_util::codec::{Framed, LinesCodec, LinesCodecError}; -use futures::{Poll, SinkExt, Stream, StreamExt}; +use futures::{SinkExt, Stream, StreamExt}; use std::collections::HashMap; use std::env; use std::error::Error; @@ -38,7 +38,7 @@ use std::io; use std::net::SocketAddr; use std::pin::Pin; use std::sync::Arc; -use std::task::Context; +use std::task::{Context, Poll}; #[tokio::main] async fn main() -> Result<(), Box<dyn Error>> { diff --git a/examples/connect.rs b/examples/connect.rs index 0dd14ef2..38d81229 100644 --- a/examples/connect.rs +++ b/examples/connect.rs @@ -20,7 +20,7 @@ use tokio::io; use tokio::sync::{mpsc, oneshot}; use tokio_util::codec::{FramedRead, FramedWrite}; -use futures::{SinkExt, Stream}; +use futures::{SinkExt, Stream, StreamExt}; use std::env; use std::error::Error; use std::net::SocketAddr; @@ -69,7 +69,7 @@ async fn run() -> Result<(), Box<dyn Error>> { // Temporary work around for stdin blocking the stream fn stdin() -> impl Stream<Item = Result<Vec<u8>, io::Error>> + Unpin { - let mut stdin = FramedRead::new(io::stdin(), codec::Bytes); + let mut stdin = FramedRead::new(io::stdin(), codec::Bytes).map(Ok); let (mut tx, rx) = mpsc::unbounded_channel(); @@ -95,13 +95,15 @@ mod tcp { let mut stream = TcpStream::connect(addr).await?; let (r, w) = stream.split(); let sink = FramedWrite::new(w, codec::Bytes); - let mut stream = FramedRead::new(r, codec::Bytes).filter_map(|i| match i { - Ok(i) => future::ready(Some(i)), - Err(e) => { - println!("failed to read from socket; error={}", e); - future::ready(None) - } - }); + let mut stream = FramedRead::new(r, codec::Bytes) + .filter_map(|i| match i { + Ok(i) => future::ready(Some(i)), + Err(e) => { + println!("failed to read from socket; error={}", e); + future::ready(None) + } + }) + .map(Ok); match future::join(stdin.forward(sink), stdout.send_all(&mut stream)).await { (Err(e), _) | (_, Err(e)) => Err(e.into()), diff --git a/tests-integration/Cargo.toml b/tests-integration/Cargo.toml index 0dcc1e81..2a6af097 100644 --- a/tests-integration/Cargo.toml +++ b/tests-integration/Cargo.toml @@ -11,4 +11,4 @@ publish = false tokio = { path = "../tokio" } tokio-test = { path = "../tokio-test" } -futures-preview = { version = "=0.3.0-alpha.19", features = ["async-await"] } +futures = { version = "0.3.0", features = ["async-await"] } diff --git a/tokio-test/Cargo.toml b/tokio-test/Cargo.toml index 6d7ebc34..ad0a567a 100644 --- a/tokio-test/Cargo.toml +++ b/tokio-test/Cargo.toml @@ -23,10 +23,10 @@ categories = ["asynchronous", "testing"] tokio = { version = "=0.2.0-alpha.6", path = "../tokio" } bytes = "0.4" -futures-core-preview = "=0.3.0-alpha.19" +futures-core = "0.3.0" [dev-dependencies] -futures-util-preview = "=0.3.0-alpha.19" +futures-util = "0.3.0" [package.metadata.docs.rs] all-features = true diff --git a/tokio-tls/Cargo.toml b/tokio-tls/Cargo.toml index 2168aa8b..bfd5b686 100644 --- a/tokio-tls/Cargo.toml +++ b/tokio-tls/Cargo.toml @@ -33,7 +33,7 @@ tokio = { version = "=0.2.0-alpha.6", path = "../tokio" } cfg-if = "0.1" env_logger = { version = "0.6", default-features = false } -futures-preview = { version = "=0.3.0-alpha.19", features = ["async-await"] } +futures = { version = "0.3.0", features = ["async-await"] } [target.'cfg(all(not(target_os = "macos"), not(windows), not(target_os = "ios")))'.dev-dependencies] openssl = "0.10" diff --git a/tokio-util/Cargo.toml b/tokio-util/Cargo.toml index 1d1c566a..034dcd02 100644 --- a/tokio-util/Cargo.toml +++ b/tokio-util/Cargo.toml @@ -23,15 +23,15 @@ categories = ["asynchronous"] tokio = { version = "=0.2.0-alpha.6", path = "../tokio" } bytes = "0.4.7" -futures-core-preview = "=0.3.0-alpha.19" -futures-sink-preview = "=0.3.0-alpha.19" +futures-core = "0.3.0" +futures-sink = "0.3.0" log = "0.4" [dev-dependencies] tokio = { version = "=0.2.0-alpha.6", path = "../tokio" } tokio-test = { version = "=0.2.0-alpha.6", path = "../tokio-test" } -futures-util-preview = "=0.3.0-alpha.19" +futures-util = "0.3.0" [package.metadata.docs.rs] all-features = true diff --git a/tokio-util/src/codec/mod.rs b/tokio-util/src/codec/mod.rs index fd080dc1..203efae4 100644 --- a/tokio-util/src/codec/mod.rs +++ b/tokio-util/src/codec/mod.rs @@ -6,8 +6,8 @@ //! //! [`AsyncRead`]: https://docs.rs/tokio/*/tokio/io/trait.AsyncRead.html //! [`AsyncWrite`]: https://docs.rs/tokio/*/tokio/io/trait.AsyncWrite.html -//! [`Sink`]: https://docs.rs/futures-sink-preview/*/futures_sink/trait.Sink.html -//! [`Stream`]: https://docs.rs/futures-core-preview/*/futures_core/stream/trait.Stream.html +//! [`Sink`]: https://docs.rs/futures-sink/*/futures_sink/trait.Sink.html +//! [`Stream`]: https://docs.rs/futures-core/*/futures_core/stream/trait.Stream.html #[macro_use] mod macros; diff --git a/tokio-util/tests/udp.rs b/tokio-util/tests/udp.rs index 89f5c6a9..3aac8eaf 100644 --- a/tokio-util/tests/udp.rs +++ b/tokio-util/tests/udp.rs @@ -3,10 +3,10 @@ use tokio_util::codec::{Decoder, Encoder}; use tokio_util::udp::UdpFramed; use bytes::{BufMut, BytesMut}; +use futures_util::future::try_join; use futures_util::future::FutureExt; use futures_util::sink::SinkExt; use futures_util::stream::StreamExt; -use futures_util::try_future::try_join; use std::io; #[tokio::test] diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index 7380b1ea..58d7cecc 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -88,9 +88,9 @@ process = [ [dependencies] tokio-macros = { version = "=0.2.0-alpha.6", optional = true, path = "../tokio-macros" } -futures-core-preview = "=0.3.0-alpha.19" -futures-sink-preview = "=0.3.0-alpha.19" -futures-util-preview = { version = "=0.3.0-alpha.19", features = ["sink", "channel"] } +futures-core = "0.3.0" +futures-sink = "0.3.0" +futures-util = { version = "0.3.0", features = ["sink", "channel"] } # Everything else is optional... bytes = { version = "0.4", optional = true } @@ -119,8 +119,8 @@ optional = true [dev-dependencies] tokio-test = { version = "=0.2.0-alpha.6", path = "../tokio-test" } -futures-preview = { version = "=0.3.0-alpha.19", features = ["async-await"] } -loom = { version = "0.2.12", features = ["futures", "checkpoint"] } +futures = { version = "0.3.0", features = ["async-await"] } +loom = { version = "0.2.13", features = ["futures", "checkpoint"] } proptest = "0.9.4" tempfile = "3.1.0" diff --git a/tokio/src/process/mod.rs b/tokio/src/process/mod.rs index 251d2ada..e777da52 100644 --- a/tokio/src/process/mod.rs +++ b/tokio/src/process/mod.rs @@ -121,7 +121,7 @@ use crate::io::{AsyncRead, AsyncReadExt, AsyncWrite}; use crate::process::kill::Kill; use futures_core::TryFuture; -use futures_util::try_future::try_join3; +use futures_util::future::try_join3; use std::ffi::OsStr; use std::future::Future; use std::io; diff --git a/tokio/tests/fs_dir.rs b/tokio/tests/fs_dir.rs index cb1da22d..7ef2db6f 100644 --- a/tokio/tests/fs_dir.rs +++ b/tokio/tests/fs_dir.rs @@ -4,7 +4,7 @@ use tokio::fs; use tokio_test::assert_ok; use futures_util::future; -use futures_util::try_stream::TryStreamExt; +use futures_util::stream::TryStreamExt; use std::sync::{Arc, Mutex}; use tempfile::tempdir; |