diff --git a/tokio-postgres/src/tls/openssl.rs b/tokio-postgres/src/tls/openssl.rs index c6ff00a8..5c53dce8 100644 --- a/tokio-postgres/src/tls/openssl.rs +++ b/tokio-postgres/src/tls/openssl.rs @@ -2,12 +2,13 @@ extern crate tokio_openssl; pub extern crate openssl; -use futures::{Future, BoxFuture}; +use futures::Future; use self::openssl::ssl::{SslMethod, SslConnector, SslConnectorBuilder}; use self::openssl::error::ErrorStack; use std::error::Error; use self::tokio_openssl::{SslConnectorExt, SslStream}; +use BoxedFuture; use tls::{Stream, TlsStream, Handshake}; impl TlsStream for SslStream { @@ -42,7 +43,7 @@ impl Handshake for OpenSsl { self: Box, host: &str, stream: Stream, - ) -> BoxFuture, Box> { + ) -> Box, Error = Box> + Send> { self.0 .connect_async(host, stream) .map(|s| { @@ -53,6 +54,6 @@ impl Handshake for OpenSsl { let e: Box = Box::new(e); e }) - .boxed() + .boxed2() } }