Remove more deprecated use
This commit is contained in:
parent
a24704e998
commit
24abd2e319
@ -2,12 +2,13 @@
|
|||||||
extern crate tokio_openssl;
|
extern crate tokio_openssl;
|
||||||
pub extern crate openssl;
|
pub extern crate openssl;
|
||||||
|
|
||||||
use futures::{Future, BoxFuture};
|
use futures::Future;
|
||||||
use self::openssl::ssl::{SslMethod, SslConnector, SslConnectorBuilder};
|
use self::openssl::ssl::{SslMethod, SslConnector, SslConnectorBuilder};
|
||||||
use self::openssl::error::ErrorStack;
|
use self::openssl::error::ErrorStack;
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use self::tokio_openssl::{SslConnectorExt, SslStream};
|
use self::tokio_openssl::{SslConnectorExt, SslStream};
|
||||||
|
|
||||||
|
use BoxedFuture;
|
||||||
use tls::{Stream, TlsStream, Handshake};
|
use tls::{Stream, TlsStream, Handshake};
|
||||||
|
|
||||||
impl TlsStream for SslStream<Stream> {
|
impl TlsStream for SslStream<Stream> {
|
||||||
@ -42,7 +43,7 @@ impl Handshake for OpenSsl {
|
|||||||
self: Box<Self>,
|
self: Box<Self>,
|
||||||
host: &str,
|
host: &str,
|
||||||
stream: Stream,
|
stream: Stream,
|
||||||
) -> BoxFuture<Box<TlsStream>, Box<Error + Sync + Send>> {
|
) -> Box<Future<Item = Box<TlsStream>, Error = Box<Error + Sync + Send>> + Send> {
|
||||||
self.0
|
self.0
|
||||||
.connect_async(host, stream)
|
.connect_async(host, stream)
|
||||||
.map(|s| {
|
.map(|s| {
|
||||||
@ -53,6 +54,6 @@ impl Handshake for OpenSsl {
|
|||||||
let e: Box<Error + Sync + Send> = Box::new(e);
|
let e: Box<Error + Sync + Send> = Box::new(e);
|
||||||
e
|
e
|
||||||
})
|
})
|
||||||
.boxed()
|
.boxed2()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user