summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Lerche <me@carllerche.com>2019-07-19 13:11:46 -0700
committerGitHub <noreply@github.com>2019-07-19 13:11:46 -0700
commita99fa6e0963e9d3abad8c33df31b42f87fe86b06 (patch)
treecd6ba77e4c4a4442aef85b577f06a384a69b448d
parentb89ed00a0d0b5ffa8fd3fa3a1faee31b5693cd64 (diff)
chore: remove tokio-futures facade crate (#1327)
This switches from using the tokio-futures facade to referencing futures-* crates directly.
-rw-r--r--Cargo.toml1
-rw-r--r--README.md3
-rw-r--r--ci/patch.toml1
-rw-r--r--tokio-codec/Cargo.toml3
-rw-r--r--tokio-codec/src/framed.rs13
-rw-r--r--tokio-codec/src/framed_read.rs11
-rw-r--r--tokio-codec/src/framed_write.rs20
-rw-r--r--tokio-codec/src/macros.rs15
-rw-r--r--tokio-codec/tests/framed_write.rs6
-rw-r--r--tokio-fs/Cargo.toml1
-rw-r--r--tokio-fs/src/file/clone.rs1
-rw-r--r--tokio-fs/src/file/create.rs2
-rw-r--r--tokio-fs/src/file/metadata.rs2
-rw-r--r--tokio-fs/src/file/mod.rs3
-rw-r--r--tokio-fs/src/file/open.rs2
-rw-r--r--tokio-fs/src/file/open_options.rs1
-rw-r--r--tokio-fs/src/file/seek.rs2
-rw-r--r--tokio-fs/src/lib.rs3
-rw-r--r--tokio-fs/src/metadata.rs1
-rw-r--r--tokio-fs/src/read.rs6
-rw-r--r--tokio-fs/src/stderr.rs3
-rw-r--r--tokio-fs/src/stdin.rs3
-rw-r--r--tokio-fs/src/stdout.rs3
-rw-r--r--tokio-fs/src/symlink_metadata.rs1
-rw-r--r--tokio-fs/src/write.rs6
-rw-r--r--tokio-futures/Cargo.toml27
-rw-r--r--tokio-futures/LICENSE52
-rw-r--r--tokio-futures/README.md13
-rw-r--r--tokio-futures/src/future.rs3
-rw-r--r--tokio-futures/src/lib.rs16
-rw-r--r--tokio-futures/src/sink.rs3
-rw-r--r--tokio-futures/src/stream.rs3
-rw-r--r--tokio-sync/Cargo.toml4
-rw-r--r--tokio-sync/src/mpsc/bounded.rs2
-rw-r--r--tokio-sync/src/mpsc/unbounded.rs2
-rw-r--r--tokio-sync/src/watch.rs2
-rw-r--r--tokio-sync/tests/mpsc.rs4
-rw-r--r--tokio/Cargo.toml5
-rw-r--r--tokio/src/io/lines.rs7
39 files changed, 69 insertions, 187 deletions
diff --git a/Cargo.toml b/Cargo.toml
index dab15da5..9281766b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -7,7 +7,6 @@ members = [
"tokio-current-thread",
"tokio-executor",
"tokio-fs",
- "tokio-futures",
"tokio-io",
"tokio-macros",
"tokio-reactor",
diff --git a/README.md b/README.md
index b8bc704e..23311e13 100644
--- a/README.md
+++ b/README.md
@@ -139,8 +139,6 @@ The crates included as part of Tokio are:
* [`tokio-fs`]: Filesystem (and standard in / out) APIs.
-* [`tokio-futures`]: Experimental `std::future::Future` and `async` / `await` support.
-
* [`tokio-codec`]: Utilities for encoding and decoding protocol frames.
* [`tokio-io`]: Asynchronous I/O related traits and utilities.
@@ -166,7 +164,6 @@ The crates included as part of Tokio are:
[`tokio-current-thread`]: tokio-current-thread
[`tokio-executor`]: tokio-executor
[`tokio-fs`]: tokio-fs
-[`tokio-futures`]: tokio-futures
[`tokio-io`]: tokio-io
[`tokio-macros`]: tokio-macros
[`tokio-reactor`]: tokio-reactor
diff --git a/ci/patch.toml b/ci/patch.toml
index e34484a2..5942adda 100644
--- a/ci/patch.toml
+++ b/ci/patch.toml
@@ -7,7 +7,6 @@ tokio-codec = { path = "tokio-codec" }
tokio-current-thread = { path = "tokio-current-thread" }
tokio-executor = { path = "tokio-executor" }
tokio-fs = { path = "tokio-fs" }
-tokio-futures = { path = "tokio-futures" }
tokio-io = { path = "tokio-io" }
tokio-reactor = { path = "tokio-reactor" }
tokio-signal = { path = "tokio-signal" }
diff --git a/tokio-codec/Cargo.toml b/tokio-codec/Cargo.toml
index 957d8cf9..86aa1f8e 100644
--- a/tokio-codec/Cargo.toml
+++ b/tokio-codec/Cargo.toml
@@ -24,7 +24,8 @@ publish = false
[dependencies]
tokio-io = { version = "0.2.0", path = "../tokio-io" }
bytes = "0.4.7"
-tokio-futures = { version = "0.2.0", path = "../tokio-futures" }
+futures-core-preview = "0.3.0-alpha.17"
+futures-sink-preview = "0.3.0-alpha.17"
log = "0.4"
[dev-dependencies]
diff --git a/tokio-codec/src/framed.rs b/tokio-codec/src/framed.rs
index 1929b3eb..26e3373f 100644
--- a/tokio-codec/src/framed.rs
+++ b/tokio-codec/src/framed.rs
@@ -1,18 +1,19 @@
#![allow(deprecated)]
-use std::fmt;
-use std::io::{self, Read, Write};
-use std::pin::Pin;
-use std::task::{Context, Poll};
-
use crate::decoder::Decoder;
use crate::encoder::Encoder;
use crate::framed_read::{framed_read2, framed_read2_with_buffer, FramedRead2};
use crate::framed_write::{framed_write2, framed_write2_with_buffer, FramedWrite2};
-use tokio_futures::{Sink, Stream};
+
use tokio_io::{AsyncRead, AsyncWrite};
use bytes::BytesMut;
+use futures_core::Stream;
+use futures_sink::Sink;
+use std::fmt;
+use std::io::{self, Read, Write};
+use std::pin::Pin;
+use std::task::{Context, Poll};
/// A unified `Stream` and `Sink` interface to an underlying I/O object, using
/// the `Encoder` and `Decoder` traits to encode and decode frames.
diff --git a/tokio-codec/src/framed_read.rs b/tokio-codec/src/framed_read.rs
index 13c47541..66bc0df1 100644
--- a/tokio-codec/src/framed_read.rs
+++ b/tokio-codec/src/framed_read.rs
@@ -1,14 +1,15 @@
-use std::fmt;
-use std::pin::Pin;
-use std::task::{Context, Poll};
-
use super::framed::Fuse;
use super::Decoder;
-use tokio_futures::{Sink, Stream};
+
use tokio_io::AsyncRead;
use bytes::BytesMut;
+use futures_core::Stream;
+use futures_sink::Sink;
use log::trace;
+use std::fmt;
+use std::pin::Pin;
+use std::task::{Context, Poll};
/// A `Stream` of messages decoded from an `AsyncRead`.
pub struct FramedRead<T, D> {
diff --git a/tokio-codec/src/framed_write.rs b/tokio-codec/src/framed_write.rs
index 153f5881..58bafa96 100644
--- a/tokio-codec/src/framed_write.rs
+++ b/tokio-codec/src/framed_write.rs
@@ -1,16 +1,17 @@
#![allow(deprecated)]
-use log::trace;
-use std::fmt;
-use std::io::{self, Read};
-
use super::framed::Fuse;
use crate::decoder::Decoder;
use crate::encoder::Encoder;
-use tokio_futures::{Sink, Stream};
+
use tokio_io::{AsyncRead, AsyncWrite};
use bytes::BytesMut;
+use futures_core::{ready, Stream};
+use futures_sink::Sink;
+use log::trace;
+use std::fmt;
+use std::io::{self, Read};
use std::pin::Pin;
use std::task::{Context, Poll};
@@ -208,7 +209,7 @@ where
trace!("writing; remaining={}", pinned.buffer.len());
let buf = &pinned.buffer;
- let n = try_ready!(pin!(pinned.inner).poll_write(cx, &buf));
+ let n = ready!(pin!(pinned.inner).poll_write(cx, &buf))?;
if n == 0 {
return Poll::Ready(Err(io::Error::new(
@@ -224,15 +225,16 @@ where
}
// Try flushing the underlying IO
- try_ready!(pin!(pinned.inner).poll_flush(cx));
+ ready!(pin!(pinned.inner).poll_flush(cx))?;
trace!("framed transport flushed");
Poll::Ready(Ok(()))
}
fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
- let () = try_ready!(pin!(self).poll_flush(cx));
- let () = try_ready!(pin!(self.inner).poll_shutdown(cx));
+ ready!(pin!(self).poll_flush(cx))?;
+ ready!(pin!(self.inner).poll_shutdown(cx))?;
+
Poll::Ready(Ok(()))
}
}
diff --git a/tokio-codec/src/macros.rs b/tokio-codec/src/macros.rs
index 871f8182..902ada1c 100644
--- a/tokio-codec/src/macros.rs
+++ b/tokio-codec/src/macros.rs
@@ -1,18 +1,3 @@
-// TODO this macro should probably be somewhere in tokio-futures
-/// A macro for extracting the successful type of a `Poll<T, E>`.
-///
-/// This macro bakes propagation of both errors and `Pending` signals by
-/// returning early.
-macro_rules! try_ready {
- ($e:expr) => {
- match $e {
- std::task::Poll::Pending => return std::task::Poll::Pending,
- std::task::Poll::Ready(Err(e)) => return std::task::Poll::Ready(Err(From::from(e))),
- std::task::Poll::Ready(Ok(t)) => t,
- }
- };
-}
-
/// A macro to reduce some of the boilerplate for projecting from
/// `Pin<&mut T>` to `Pin<&mut T.field>`
macro_rules! pin {
diff --git a/tokio-codec/tests/framed_write.rs b/tokio-codec/tests/framed_write.rs
index f29ce290..c1595154 100644
--- a/tokio-codec/tests/framed_write.rs
+++ b/tokio-codec/tests/framed_write.rs
@@ -1,13 +1,13 @@
#![deny(warnings, rust_2018_idioms)]
-use bytes::{BufMut, BytesMut};
-use std::collections::VecDeque;
use tokio_codec::{Encoder, FramedWrite};
-use tokio_futures::Sink;
use tokio_io::AsyncWrite;
use tokio_test::assert_ready;
use tokio_test::task::MockTask;
+use bytes::{BufMut, BytesMut};
+use futures_sink::Sink;
+use std::collections::VecDeque;
use std::io::{self, Write};
use std::pin::Pin;
use std::task::Poll::{Pending, Ready};
diff --git a/tokio-fs/Cargo.toml b/tokio-fs/Cargo.toml
index 82f77460..c3589498 100644
--- a/tokio-fs/Cargo.toml
+++ b/tokio-fs/Cargo.toml
@@ -27,7 +27,6 @@ publish = false
futures-core-preview = "0.3.0-alpha.17"
tokio-threadpool = { version = "0.2.0", path = "../tokio-threadpool" }
tokio-io = { version = "0.2.0", path = "../tokio-io" }
-tokio-futures = { version = "0.2.0", path = "../tokio-futures" }
[dev-dependencies]
rand = "0.7"
diff --git a/tokio-fs/src/file/clone.rs b/tokio-fs/src/file/clone.rs
index 899f3346..bec79033 100644
--- a/tokio-fs/src/file/clone.rs
+++ b/tokio-fs/src/file/clone.rs
@@ -1,4 +1,5 @@
use super::File;
+
use std::future::Future;
use std::io;
use std::pin::Pin;
diff --git a/tokio-fs/src/file/create.rs b/tokio-fs/src/file/create.rs
index 41ca554f..15fbc8f6 100644
--- a/tokio-fs/src/file/create.rs
+++ b/tokio-fs/src/file/create.rs
@@ -1,4 +1,6 @@
use super::File;
+
+use futures_core::ready;
use std::fs::File as StdFile;
use std::future::Future;
use std::io;
diff --git a/tokio-fs/src/file/metadata.rs b/tokio-fs/src/file/metadata.rs
index 67be837a..9afb7f7b 100644
--- a/tokio-fs/src/file/metadata.rs
+++ b/tokio-fs/src/file/metadata.rs
@@ -1,4 +1,6 @@
use super::File;
+
+use futures_core::ready;
use std::fs::File as StdFile;
use std::fs::Metadata;
use std::future::Future;
diff --git a/tokio-fs/src/file/mod.rs b/tokio-fs/src/file/mod.rs
index 76b51ae8..9e5ffbd9 100644
--- a/tokio-fs/src/file/mod.rs
+++ b/tokio-fs/src/file/mod.rs
@@ -16,13 +16,14 @@ pub use self::open::OpenFuture;
pub use self::open_options::OpenOptions;
pub use self::seek::SeekFuture;
+use tokio_io::{AsyncRead, AsyncWrite};
+
use std::fs::{File as StdFile, Metadata, Permissions};
use std::io::{self, Read, Seek, Write};
use std::path::Path;
use std::pin::Pin;
use std::task::Context;
use std::task::Poll;
-use tokio_io::{AsyncRead, AsyncWrite};
/// A reference to an open file on the filesystem.
///
diff --git a/tokio-fs/src/file/open.rs b/tokio-fs/src/file/open.rs
index c25c2e1f..abe7bcb2 100644
--- a/tokio-fs/src/file/open.rs
+++ b/tokio-fs/src/file/open.rs
@@ -1,4 +1,6 @@
use super::File;
+
+use futures_core::ready;
use std::fs::OpenOptions as StdOpenOptions;
use std::future::Future;
use std::io;
diff --git a/tokio-fs/src/file/open_options.rs b/tokio-fs/src/file/open_options.rs
index 41f232e1..124feb17 100644
--- a/tokio-fs/src/file/open_options.rs
+++ b/tokio-fs/src/file/open_options.rs
@@ -1,4 +1,5 @@
use super::OpenFuture;
+
use std::convert::From;
use std::fs::OpenOptions as StdOpenOptions;
use std::path::Path;
diff --git a/tokio-fs/src/file/seek.rs b/tokio-fs/src/file/seek.rs
index 18ee4329..ab0aca97 100644
--- a/tokio-fs/src/file/seek.rs
+++ b/tokio-fs/src/file/seek.rs
@@ -1,4 +1,6 @@
use super::File;
+
+use futures_core::ready;
use std::future::Future;
use std::io;
use std::pin::Pin;
diff --git a/tokio-fs/src/lib.rs b/tokio-fs/src/lib.rs
index 540106ad..f4376853 100644
--- a/tokio-fs/src/lib.rs
+++ b/tokio-fs/src/lib.rs
@@ -30,9 +30,6 @@
//! [`AsyncRead`]: https://docs.rs/tokio-io/0.1/tokio_io/trait.AsyncRead.html
//! [tokio-threadpool]: https://docs.rs/tokio-threadpool/0.1/tokio_threadpool
-#[macro_use]
-extern crate tokio_futures;
-
mod create_dir;
mod create_dir_all;
pub mod file;
diff --git a/tokio-fs/src/metadata.rs b/tokio-fs/src/metadata.rs
index e54a5851..7d05f299 100644
--- a/tokio-fs/src/metadata.rs
+++ b/tokio-fs/src/metadata.rs
@@ -1,4 +1,5 @@
use super::blocking_io;
+
use std::fs::{self, Metadata};
use std::future::Future;
use std::io;
diff --git a/tokio-fs/src/read.rs b/tokio-fs/src/read.rs
index a6e1a98f..1baed103 100644
--- a/tokio-fs/src/read.rs
+++ b/tokio-fs/src/read.rs
@@ -1,11 +1,13 @@
use crate::{file, File};
+
+use tokio_io::AsyncRead;
+
+use futures_core::ready;
use std::future::Future;
use std::pin::Pin;
use std::task::Context;
use std::task::Poll;
use std::{io, mem, path::Path};
-use tokio_io;
-use tokio_io::AsyncRead;
/// Creates a future which will open a file for reading and read the entire
/// contents into a buffer and return said buffer.
diff --git a/tokio-fs/src/stderr.rs b/tokio-fs/src/stderr.rs
index 273e8e22..e8654b28 100644
--- a/tokio-fs/src/stderr.rs
+++ b/tokio-fs/src/stderr.rs
@@ -1,8 +1,9 @@
+use tokio_io::AsyncWrite;
+
use std::io::{self, Stderr as StdStderr, Write};
use std::pin::Pin;
use std::task::Context;
use std::task::Poll;
-use tokio_io::AsyncWrite;
/// A handle to the standard error stream of a process.
///
diff --git a/tokio-fs/src/stdin.rs b/tokio-fs/src/stdin.rs
index 3c5a387b..41ce7a2a 100644
--- a/tokio-fs/src/stdin.rs
+++ b/tokio-fs/src/stdin.rs
@@ -1,8 +1,9 @@
+use tokio_io::AsyncRead;
+
use std::io::{self, Read, Stdin as StdStdin};
use std::pin::Pin;
use std::task::Context;
use std::task::Poll;
-use tokio_io::AsyncRead;
/// A handle to the standard input stream of a process.
///
diff --git a/tokio-fs/src/stdout.rs b/tokio-fs/src/stdout.rs
index a661dbf3..be9e0c69 100644
--- a/tokio-fs/src/stdout.rs
+++ b/tokio-fs/src/stdout.rs
@@ -1,8 +1,9 @@
+use tokio_io::AsyncWrite;
+
use std::io::{self, Stdout as StdStdout, Write};
use std::pin::Pin;
use std::task::Context;
use std::task::Poll;
-use tokio_io::AsyncWrite;
/// A handle to the standard output stream of a process.
///
diff --git a/tokio-fs/src/symlink_metadata.rs b/tokio-fs/src/symlink_metadata.rs
index 0cae53c5..bd880417 100644
--- a/tokio-fs/src/symlink_metadata.rs
+++ b/tokio-fs/src/symlink_metadata.rs
@@ -1,4 +1,5 @@
use super::blocking_io;
+
use std::fs::{self, Metadata};
use std::future::Future;
use std::io;
diff --git a/tokio-fs/src/write.rs b/tokio-fs/src/write.rs
index d3d357ca..701d2d3b 100644
--- a/tokio-fs/src/write.rs
+++ b/tokio-fs/src/write.rs
@@ -1,11 +1,13 @@
use crate::{file, File};
+
+use tokio_io::AsyncWrite;
+
+use futures_core::ready;
use std::future::Future;
use std::pin::Pin;
use std::task::Context;
use std::task::Poll;
use std::{fmt, io, mem, path::Path};
-use tokio_io;
-use tokio_io::AsyncWrite;
/// Creates a future that will open a file for writing and write the entire
/// contents of `contents` to it.
diff --git a/tokio-futures/Cargo.toml b/tokio-futures/Cargo.toml
deleted file mode 100644
index 852a1204..00000000
--- a/tokio-futures/Cargo.toml
+++ /dev/null
@@ -1,27 +0,0 @@
-[package]
-name = "tokio-futures"
-
-# When releasing to crates.io:
-# - Update html_root_url.
-version = "0.2.0"
-edition = "2018"
-authors = ["Carl Lerche <me@carllerche.com>"]
-license = "MIT"
-repository = "https://github.com/tokio-rs/tokio"
-homepage = "https://tokio.rs"
-documentation = "https://docs.rs/tokio-futures/0.1.0"
-description = """
-Utilities for working with futures, async, and await.
-"""
-categories = ["asynchronous"]
-publish = false
-
-[features]
-all = []
-default = [
- "all",
-]
-
-[dependencies]
-futures-core-preview = "0.3.0-alpha.17"
-futures-sink-preview = "0.3.0-alpha.17"
diff --git a/tokio-futures/LICENSE b/tokio-futures/LICENSE
deleted file mode 100644
index 7181fd07..00000000
--- a/tokio-futures/LICENSE
+++ /dev/null
@@ -1,52 +0,0 @@
-Copyright (c) 2019 Tokio Contributors
-
-Permission is hereby granted, free of charge, to any
-person obtaining a copy of this software and associated
-documentation files (the "Software"), to deal in the
-Software without restriction, including without
-limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software
-is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice
-shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
-
-Copyright (c) 2016 futures-rs authors
-
-Permission is hereby granted, free of charge, to any
-person obtaining a copy of this software and associated
-documentation files (the "Software"), to deal in the
-Software without restriction, including without
-limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software
-is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice
-shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
-
diff --git a/tokio-futures/README.md b/tokio-futures/README.md
deleted file mode 100644
index c919b02c..00000000
--- a/tokio-futures/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# Tokio Futures
-
-Asynchronous abstractions for the Tokio stack.
-
-## License
-
-This project is licensed under the [MIT license](LICENSE).
-
-### Contribution
-
-Unless you explicitly state otherwise, any contribution intentionally submitted
-for inclusion in Tokio by you, shall be licensed as MIT, without any additional
-terms or conditions.
diff --git a/tokio-futures/src/future.rs b/tokio-futures/src/future.rs
deleted file mode 100644
index eb7c261f..00000000
--- a/tokio-futures/src/future.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-//! Futures
-
-pub use core::future::Future;
diff --git a/tokio-futures/src/lib.rs b/tokio-futures/src/lib.rs
deleted file mode 100644
index ba25e227..00000000
--- a/tokio-futures/src/lib.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-#![doc(html_root_url = "https://docs.rs/tokio-futures/0.2.0")]
-#![cfg(feature = "all")]
-#![deny(missing_docs, missing_debug_implementations, rust_2018_idioms)]
-#![cfg_attr(test, deny(warnings))]
-
-//! Futures
-
-pub mod future;
-pub mod sink;
-pub mod stream;
-
-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/sink.rs b/tokio-futures/src/sink.rs
deleted file mode 100644
index 26edfd1d..00000000
--- a/tokio-futures/src/sink.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-//! Sinks
-
-pub use futures_sink::Sink;
diff --git a/tokio-futures/src/stream.rs b/tokio-futures/src/stream.rs
deleted file mode 100644
index 0f413105..00000000
--- a/tokio-futures/src/stream.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-//! Streams
-
-pub use futures_core::stream::Stream;
diff --git a/tokio-sync/Cargo.toml b/tokio-sync/Cargo.toml
index e8fddf16..a3f482dd 100644
--- a/tokio-sync/Cargo.toml
+++ b/tokio-sync/Cargo.toml
@@ -22,13 +22,13 @@ categories = ["asynchronous"]
publish = false
[features]
-async-traits = ["tokio-futures"]
+async-traits = ["futures-sink-preview"]
[dependencies]
async-util = { git = "https://github.com/tokio-rs/async" }
-tokio-futures = { path = "../tokio-futures", optional = true }
fnv = "1.0.6"
futures-core-preview = { version = "0.3.0-alpha.17" }
+futures-sink-preview = { version = "0.3.0-alpha.17", optional = true }
[dev-dependencies]
env_logger = { version = "0.5", default-features = false }
diff --git a/tokio-sync/src/mpsc/bounded.rs b/tokio-sync/src/mpsc/bounded.rs
index 8b6dcc14..c549f549 100644
--- a/tokio-sync/src/mpsc/bounded.rs
+++ b/tokio-sync/src/mpsc/bounded.rs
@@ -214,7 +214,7 @@ impl<T> Sender<T> {
}
#[cfg(feature = "async-traits")]
-impl<T> tokio_futures::Sink<T> for Sender<T> {
+impl<T> futures_sink::Sink<T> for Sender<T> {
type Error = SendError;
fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
diff --git a/tokio-sync/src/mpsc/unbounded.rs b/tokio-sync/src/mpsc/unbounded.rs
index 8066c04d..dd1664a4 100644
--- a/tokio-sync/src/mpsc/unbounded.rs
+++ b/tokio-sync/src/mpsc/unbounded.rs
@@ -130,7 +130,7 @@ impl<T> UnboundedSender<T> {
}
#[cfg(feature = "async-traits")]
-impl<T> tokio_futures::Sink<T> for UnboundedSender<T> {
+impl<T> futures_sink::Sink<T> for UnboundedSender<T> {
type Error = UnboundedSendError;
fn poll_ready(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
diff --git a/tokio-sync/src/watch.rs b/tokio-sync/src/watch.rs
index 91d5d2b5..86d4580a 100644
--- a/tokio-sync/src/watch.rs
+++ b/tokio-sync/src/watch.rs
@@ -368,7 +368,7 @@ impl<T> Sender<T> {
}
#[cfg(feature = "async-traits")]
-impl<T> tokio_futures::Sink<T> for Sender<T> {
+impl<T> futures_sink::Sink<T> for Sender<T> {
type Error = error::SendError<T>;
fn poll_ready(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
diff --git a/tokio-sync/tests/mpsc.rs b/tokio-sync/tests/mpsc.rs
index 2120dc82..d683a5f8 100644
--- a/tokio-sync/tests/mpsc.rs
+++ b/tokio-sync/tests/mpsc.rs
@@ -57,8 +57,8 @@ async fn async_send_recv_with_buffer() {
#[cfg(feature = "async-traits")]
fn send_sink_recv_with_buffer() {
use futures_core::Stream;
+ use futures_sink::Sink;
use pin_utils::pin_mut;
- use tokio_futures::Sink;
let mut t1 = MockTask::new();
@@ -170,8 +170,8 @@ async fn async_send_recv_unbounded() {
#[cfg(feature = "async-traits")]
fn sink_send_recv_unbounded() {
use futures_core::Stream;
+ use futures_sink::Sink;
use pin_utils::pin_mut;
- use tokio_futures::Sink;
let mut t1 = MockTask::new();
diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml
index 6908950e..9eb7f23a 100644
--- a/tokio/Cargo.toml
+++ b/tokio/Cargo.toml
@@ -40,7 +40,7 @@ default = [
codec = ["io", "tokio-codec"]
fs = ["tokio-fs"]
-io = ["bytes", "tokio-io", "tokio-futures", "memchr"]
+io = ["bytes", "tokio-io", "memchr"]
reactor = ["io", "tokio-reactor"]
rt-full = [
"num_cpus",
@@ -82,9 +82,6 @@ tokio-timer = { version = "0.3.0", optional = true, path = "../tokio-timer" }
tracing-core = { version = "0.1", optional = true }
memchr = { version = "2.2", optional = true }
-# Needed for async/await preview support
-tokio-futures = { version = "0.2.0", optional = true, path = "../tokio-futures" }
-
[target.'cfg(unix)'.dependencies]
tokio-uds = { version = "0.3.0", optional = true, path = "../tokio-uds" }
diff --git a/tokio/src/io/lines.rs b/tokio/src/io/lines.rs
index 78afa621..85e2abb1 100644
--- a/tokio/src/io/lines.rs
+++ b/tokio/src/io/lines.rs
@@ -1,11 +1,12 @@
use super::read_line::read_line_internal;
-use futures_core::ready;
+
+use tokio_io::AsyncBufRead;
+
+use futures_core::{ready, Stream};
use std::io;
use std::mem;
use std::pin::Pin;
use std::task::{Context, Poll};
-use tokio_futures::Stream;
-use tokio_io::AsyncBufRead;
/// Stream for the [`lines`](crate::io::AsyncBufReadExt::lines) method.
#[derive(Debug)]