mirror of
https://github.com/OMGeeky/tarpc.git
synced 2026-02-13 21:18:18 +01:00
Update to futures-preview 0.3.0-alpha.17 (#238)
* Update to futures-preview 0.3.0-alpha.17 * Update feature gate async_closure was moved out from async_await
This commit is contained in:
@@ -18,7 +18,7 @@ serde1 = ["trace/serde", "serde", "serde/derive"]
|
||||
|
||||
[dependencies]
|
||||
fnv = "1.0"
|
||||
futures-preview = { version = "0.3.0-alpha.16", features = ["compat"] }
|
||||
futures-preview = { version = "0.3.0-alpha.17", features = ["compat"] }
|
||||
humantime = "1.0"
|
||||
log = "0.4"
|
||||
pin-utils = "0.1.0-alpha.4"
|
||||
@@ -28,7 +28,7 @@ trace = { package = "tarpc-trace", version = "0.2", path = "../trace" }
|
||||
serde = { optional = true, version = "1.0" }
|
||||
|
||||
[dev-dependencies]
|
||||
futures-test-preview = { version = "0.3.0-alpha.16" }
|
||||
futures-test-preview = { version = "0.3.0-alpha.17" }
|
||||
env_logger = "0.6"
|
||||
tokio = "0.1"
|
||||
tokio-executor = "0.1"
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
integer_atomics,
|
||||
try_trait,
|
||||
arbitrary_self_types,
|
||||
async_await
|
||||
async_await,
|
||||
async_closure
|
||||
)]
|
||||
#![deny(missing_docs, missing_debug_implementations)]
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ use futures::{
|
||||
ready,
|
||||
stream::Fuse,
|
||||
task::{Context, Poll},
|
||||
try_ready,
|
||||
};
|
||||
use humantime::format_rfc3339;
|
||||
use log::{debug, error, info, trace, warn};
|
||||
@@ -334,7 +333,7 @@ where
|
||||
peer,
|
||||
self.as_mut().in_flight_requests().len(),
|
||||
);
|
||||
try_ready!(self.as_mut().channel().poll_flush(cx));
|
||||
ready!(self.as_mut().channel().poll_flush(cx)?);
|
||||
}
|
||||
}
|
||||
Poll::Ready(Ok(()))
|
||||
|
||||
@@ -51,7 +51,7 @@ impl<Item, SinkItem> Stream for UnboundedChannel<Item, SinkItem> {
|
||||
}
|
||||
|
||||
impl<Item, SinkItem> Sink<SinkItem> for UnboundedChannel<Item, SinkItem> {
|
||||
type SinkError = io::Error;
|
||||
type Error = io::Error;
|
||||
|
||||
fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
|
||||
self.tx()
|
||||
@@ -65,7 +65,7 @@ impl<Item, SinkItem> Sink<SinkItem> for UnboundedChannel<Item, SinkItem> {
|
||||
.map_err(|_| io::Error::from(io::ErrorKind::NotConnected))
|
||||
}
|
||||
|
||||
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::SinkError>> {
|
||||
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
|
||||
self.tx()
|
||||
.poll_flush(cx)
|
||||
.map_err(|_| io::Error::from(io::ErrorKind::NotConnected))
|
||||
|
||||
@@ -24,7 +24,7 @@ pub mod channel;
|
||||
pub trait Transport
|
||||
where
|
||||
Self: Stream<Item = io::Result<<Self as Transport>::Item>>,
|
||||
Self: Sink<<Self as Transport>::SinkItem, SinkError = io::Error>,
|
||||
Self: Sink<<Self as Transport>::SinkItem, Error = io::Error>,
|
||||
{
|
||||
/// The type read off the transport.
|
||||
type Item;
|
||||
@@ -45,7 +45,7 @@ pub fn new<S, SinkItem, Item>(
|
||||
) -> impl Transport<Item = Item, SinkItem = SinkItem>
|
||||
where
|
||||
S: Stream<Item = io::Result<Item>>,
|
||||
S: Sink<SinkItem, SinkError = io::Error>,
|
||||
S: Sink<SinkItem, Error = io::Error>,
|
||||
{
|
||||
TransportShim {
|
||||
inner,
|
||||
@@ -83,21 +83,21 @@ impl<S, Item> Sink<Item> for TransportShim<S, Item>
|
||||
where
|
||||
S: Sink<Item>,
|
||||
{
|
||||
type SinkError = S::SinkError;
|
||||
type Error = S::Error;
|
||||
|
||||
fn start_send(self: Pin<&mut Self>, item: Item) -> Result<(), S::SinkError> {
|
||||
fn start_send(self: Pin<&mut Self>, item: Item) -> Result<(), S::Error> {
|
||||
self.inner().start_send(item)
|
||||
}
|
||||
|
||||
fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), S::SinkError>> {
|
||||
fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), S::Error>> {
|
||||
self.inner().poll_ready(cx)
|
||||
}
|
||||
|
||||
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), S::SinkError>> {
|
||||
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), S::Error>> {
|
||||
self.inner().poll_flush(cx)
|
||||
}
|
||||
|
||||
fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), S::SinkError>> {
|
||||
fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), S::Error>> {
|
||||
self.inner().poll_close(cx)
|
||||
}
|
||||
}
|
||||
@@ -106,7 +106,7 @@ impl<S, SinkItem, Item> Transport for TransportShim<S, SinkItem>
|
||||
where
|
||||
S: Stream + Sink<SinkItem>,
|
||||
Self: Stream<Item = io::Result<Item>>,
|
||||
Self: Sink<SinkItem, SinkError = io::Error>,
|
||||
Self: Sink<SinkItem, Error = io::Error>,
|
||||
{
|
||||
type Item = Item;
|
||||
type SinkItem = SinkItem;
|
||||
|
||||
Reference in New Issue
Block a user