diff options
author | Aaron Hill <aa1ronham@gmail.com> | 2019-07-08 12:56:11 -0400 |
---|---|---|
committer | Carl Lerche <me@carllerche.com> | 2019-07-08 09:56:11 -0700 |
commit | d4803bc86897517d4e4598fb2b6f2216c144ce1c (patch) | |
tree | df73c94ac5dd6ad43f04e17c508c65c9098a94ca /tokio-sync | |
parent | e07a03b3c5f7453f4360e0c72c805e6f5faaf32a (diff) |
Use Sink trait from futures-sink-preview (#1244)
Diffstat (limited to 'tokio-sync')
-rw-r--r-- | tokio-sync/Cargo.toml | 4 | ||||
-rw-r--r-- | tokio-sync/src/mpsc/bounded.rs | 2 | ||||
-rw-r--r-- | tokio-sync/src/mpsc/unbounded.rs | 2 | ||||
-rw-r--r-- | tokio-sync/src/watch.rs | 2 | ||||
-rw-r--r-- | tokio-sync/tests/mpsc.rs | 4 |
5 files changed, 7 insertions, 7 deletions
diff --git a/tokio-sync/Cargo.toml b/tokio-sync/Cargo.toml index d8b5ebd8..66022b30 100644 --- a/tokio-sync/Cargo.toml +++ b/tokio-sync/Cargo.toml @@ -22,11 +22,11 @@ categories = ["asynchronous"] publish = false [features] -async-traits = ["async-sink", "futures-core-preview"] +async-traits = ["tokio-futures", "futures-core-preview"] [dependencies] async-util = { git = "https://github.com/tokio-rs/async" } -async-sink = { git = "https://github.com/tokio-rs/async", optional = true } +tokio-futures = { path = "../tokio-futures", optional = true } fnv = "1.0.6" futures-core-preview = { version = "0.3.0-alpha.17", optional = true } diff --git a/tokio-sync/src/mpsc/bounded.rs b/tokio-sync/src/mpsc/bounded.rs index af217a8a..8b6dcc14 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> async_sink::Sink<T> for Sender<T> { +impl<T> tokio_futures::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 f7fc6ec4..8066c04d 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> async_sink::Sink<T> for UnboundedSender<T> { +impl<T> tokio_futures::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 c33e3db9..ed35b0aa 100644 --- a/tokio-sync/src/watch.rs +++ b/tokio-sync/src/watch.rs @@ -367,7 +367,7 @@ impl<T> Sender<T> { } #[cfg(feature = "async-traits")] -impl<T> async_sink::Sink<T> for Sender<T> { +impl<T> tokio_futures::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 e6b61854..2120dc82 100644 --- a/tokio-sync/tests/mpsc.rs +++ b/tokio-sync/tests/mpsc.rs @@ -56,9 +56,9 @@ async fn async_send_recv_with_buffer() { #[test] #[cfg(feature = "async-traits")] fn send_sink_recv_with_buffer() { - use async_sink::Sink; use futures_core::Stream; use pin_utils::pin_mut; + use tokio_futures::Sink; let mut t1 = MockTask::new(); @@ -169,9 +169,9 @@ async fn async_send_recv_unbounded() { #[test] #[cfg(feature = "async-traits")] fn sink_send_recv_unbounded() { - use async_sink::Sink; use futures_core::Stream; use pin_utils::pin_mut; + use tokio_futures::Sink; let mut t1 = MockTask::new(); |