chore(dependencies): update futures to 0.3.1

This commit is contained in:
Daniel Johnson
2019-11-14 10:04:16 -08:00
committed by Sean McArthur
parent 9d9233ce7c
commit 71d088d3d0
10 changed files with 29 additions and 36 deletions

View File

@@ -487,7 +487,7 @@ impl From<Cow<'static, str>> for Body {
impl Sender {
/// Check to see if this `Sender` can send more data.
pub fn poll_ready(&mut self, cx: &mut task::Context<'_>) -> Poll<crate::Result<()>> {
match self.abort_tx.poll_cancel(cx) {
match self.abort_tx.poll_canceled(cx) {
Poll::Ready(()) => return Poll::Ready(Err(crate::Error::new_closed())),
Poll::Pending => (), // fallthrough
}

View File

@@ -194,10 +194,10 @@ impl<T, U> Callback<T, U> {
}
}
pub(crate) fn poll_cancel(&mut self, cx: &mut task::Context<'_>) -> Poll<()> {
pub(crate) fn poll_canceled(&mut self, cx: &mut task::Context<'_>) -> Poll<()> {
match *self {
Callback::Retry(ref mut tx) => tx.poll_cancel(cx),
Callback::NoRetry(ref mut tx) => tx.poll_cancel(cx),
Callback::Retry(ref mut tx) => tx.poll_canceled(cx),
Callback::NoRetry(ref mut tx) => tx.poll_canceled(cx),
}
}
@@ -229,7 +229,7 @@ impl<T, U> Callback<T, U> {
},
Poll::Pending => {
// check if the callback is canceled
ready!(cb.as_mut().unwrap().poll_cancel(cx));
ready!(cb.as_mut().unwrap().poll_canceled(cx));
trace!("send_when canceled");
Poll::Ready(())
},

View File

@@ -64,8 +64,7 @@ use std::sync::Arc;
use std::time::Duration;
use futures_channel::oneshot;
use futures_util::future::{self, FutureExt as _, Either};
use futures_util::try_future::TryFutureExt as _;
use futures_util::future::{self, FutureExt as _, TryFutureExt as _, Either};
use http::{Method, Request, Response, Uri, Version};
use http::header::{HeaderValue, HOST};
use http::uri::Scheme;

View File

@@ -733,9 +733,6 @@ impl<T: Poolable + 'static> Future for IdleTask<T> {
type Output = ();
fn poll(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
// Interval is a Stream
use futures_core::Stream;
loop {
match Pin::new(&mut self.pool_drop_notifier).poll(cx) {
Poll::Ready(Ok(n)) => match n {},

View File

@@ -511,7 +511,7 @@ where
match self.rx.poll_next(cx) {
Poll::Ready(Some((req, mut cb))) => {
// check that future hasn't been canceled already
match cb.poll_cancel(cx) {
match cb.poll_canceled(cx) {
Poll::Ready(()) => {
trace!("request canceled");
Poll::Ready(None)
@@ -579,7 +579,7 @@ where
fn poll_ready(&mut self, cx: &mut task::Context<'_>) -> Poll<Result<(), ()>> {
match self.callback {
Some(ref mut cb) => match cb.poll_cancel(cx) {
Some(ref mut cb) => match cb.poll_canceled(cx) {
Poll::Ready(()) => {
trace!("callback receiver has dropped");
Poll::Ready(Err(()))

View File

@@ -1,7 +1,6 @@
use futures_channel::{mpsc, oneshot};
use futures_util::future::{self, FutureExt as _, Either};
use futures_util::future::{self, FutureExt as _, TryFutureExt as _, Either};
use futures_util::stream::StreamExt as _;
use futures_util::try_future::TryFutureExt as _;
use h2::client::{Builder, SendRequest};
use tokio_io::{AsyncRead, AsyncWrite};