Skip to content

Commit 24abd2e

Browse files
committed
Remove more deprecated use
1 parent a24704e commit 24abd2e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tokio-postgres/src/tls/openssl.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
extern crate tokio_openssl;
33
pub extern crate openssl;
44

5-
use futures::{Future, BoxFuture};
5+
use futures::Future;
66
use self::openssl::ssl::{SslMethod, SslConnector, SslConnectorBuilder};
77
use self::openssl::error::ErrorStack;
88
use std::error::Error;
99
use self::tokio_openssl::{SslConnectorExt, SslStream};
1010

11+
use BoxedFuture;
1112
use tls::{Stream, TlsStream, Handshake};
1213

1314
impl TlsStream for SslStream<Stream> {
@@ -42,7 +43,7 @@ impl Handshake for OpenSsl {
4243
self: Box<Self>,
4344
host: &str,
4445
stream: Stream,
45-
) -> BoxFuture<Box<TlsStream>, Box<Error + Sync + Send>> {
46+
) -> Box<Future<Item = Box<TlsStream>, Error = Box<Error + Sync + Send>> + Send> {
4647
self.0
4748
.connect_async(host, stream)
4849
.map(|s| {
@@ -53,6 +54,6 @@ impl Handshake for OpenSsl {
5354
let e: Box<Error + Sync + Send> = Box::new(e);
5455
e
5556
})
56-
.boxed()
57+
.boxed2()
5758
}
5859
}

0 commit comments

Comments
 (0)