Skip to content

Commit

Permalink
Remove more deprecated use
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Sep 30, 2017
1 parent a24704e commit 24abd2e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tokio-postgres/src/tls/openssl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Stream> {
Expand Down Expand Up @@ -42,7 +43,7 @@ impl Handshake for OpenSsl {
self: Box<Self>,
host: &str,
stream: Stream,
) -> BoxFuture<Box<TlsStream>, Box<Error + Sync + Send>> {
) -> Box<Future<Item = Box<TlsStream>, Error = Box<Error + Sync + Send>> + Send> {
self.0
.connect_async(host, stream)
.map(|s| {
Expand All @@ -53,6 +54,6 @@ impl Handshake for OpenSsl {
let e: Box<Error + Sync + Send> = Box::new(e);
e
})
.boxed()
.boxed2()
}
}

0 comments on commit 24abd2e

Please sign in to comment.