Revert "refactor(lib): convert to futures 0.2.0-beta (#1470)"

This reverts commit a12f7beed9.

Much sadness 😢.
This commit is contained in:
Sean McArthur
2018-04-07 10:19:50 -07:00
parent 72e02d6ac8
commit 625e4daaa1
34 changed files with 1368 additions and 1386 deletions

View File

@@ -12,8 +12,7 @@ use std::fmt;
use bytes::Bytes;
use futures::{Future, Poll};
use futures::task;
use futures::io::{AsyncRead, AsyncWrite};
use tokio_io::{AsyncRead, AsyncWrite};
use proto;
use proto::body::{Body, Entity};
@@ -90,8 +89,8 @@ where S: Service<Request = Request<Body>, Response = Response<B>, Error = ::Erro
/// upgrade. Once the upgrade is completed, the connection would be "done",
/// but it is not desired to actally shutdown the IO object. Instead you
/// would take it back using `into_parts`.
pub fn poll_without_shutdown(&mut self, cx: &mut task::Context) -> Poll<(), ::Error> {
try_ready!(self.conn.poll_without_shutdown(cx));
pub fn poll_without_shutdown(&mut self) -> Poll<(), ::Error> {
try_ready!(self.conn.poll_without_shutdown());
Ok(().into())
}
}
@@ -104,8 +103,8 @@ where S: Service<Request = Request<Body>, Response = Response<B>, Error = ::Erro
type Item = ();
type Error = ::Error;
fn poll(&mut self, cx: &mut task::Context) -> Poll<Self::Item, Self::Error> {
self.conn.poll(cx)
fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
self.conn.poll()
}
}