diff --git a/src/connector.rs b/src/connector.rs index 786e4762..4ea28712 100644 --- a/src/connector.rs +++ b/src/connector.rs @@ -2,7 +2,7 @@ use std::collections::VecDeque; use std::io; use std::net::SocketAddr; -use futures::{Async, Future, Poll, future::ok}; +use futures::{future::ok, Async, Future, Poll}; use tokio; use tokio_tcp::{ConnectFuture, TcpStream}; use tower_service::Service; @@ -48,7 +48,7 @@ impl Connector { Connector { resolver } } - pub fn new_service() -> impl Future { + pub fn new_service() -> impl Future { ok(Connector::new()) } } diff --git a/src/ssl/openssl.rs b/src/ssl/openssl.rs index 319740dd..047b8bde 100644 --- a/src/ssl/openssl.rs +++ b/src/ssl/openssl.rs @@ -1,7 +1,7 @@ use std::io; use std::marker::PhantomData; -use futures::{future, future::FutureResult, Async, Poll, Future}; +use futures::{future, future::FutureResult, Async, Future, Poll}; use openssl::ssl::{AlpnError, Error, SslAcceptor, SslAcceptorBuilder, SslConnector}; use tokio_io::{AsyncRead, AsyncWrite}; use tokio_openssl::{AcceptAsync, ConnectAsync, SslAcceptorExt, SslConnectorExt, SslStream}; @@ -146,9 +146,9 @@ impl Service for OpensslConnectorService { } fn call(&mut self, (host, stream): Self::Request) -> Self::Future { - ConnectAsyncExt { + ConnectAsyncExt { fut: SslConnectorExt::connect_async(&self.connector, &host, stream), - host: Some(host) + host: Some(host), } } } @@ -168,7 +168,7 @@ where fn poll(&mut self) -> Poll { match self.fut.poll()? { Async::Ready(stream) => Ok(Async::Ready((self.host.take().unwrap(), stream))), - Async::NotReady => Ok(Async::NotReady) + Async::NotReady => Ok(Async::NotReady), } } -} \ No newline at end of file +}