@@ -8,9 +8,9 @@ use deadpool::managed::{Manager, Object, RecycleResult};
88use futures:: io:: { AsyncRead , AsyncWrite } ;
99use futures:: task:: { Context , Poll } ;
1010
11- #[ cfg( not ( feature = "h1_client_rustls" ) ) ]
11+ #[ cfg( feature = "native-tls" ) ]
1212use async_native_tls:: TlsStream ;
13- #[ cfg( feature = "h1_client_rustls " ) ]
13+ #[ cfg( feature = "rustls " ) ]
1414use async_tls:: client:: TlsStream ;
1515
1616use crate :: Error ;
@@ -76,15 +76,15 @@ impl Manager<TlsStream<TcpStream>, Error> for TlsConnection {
7676 }
7777}
7878
79- #[ cfg( not ( feature = "h1_client_rustls" ) ) ]
79+ #[ cfg( feature = "native-tls" ) ]
8080async fn add_tls (
8181 host : & str ,
8282 stream : TcpStream ,
83- ) -> Result < async_native_tls :: TlsStream < TcpStream > , async_native_tls:: Error > {
83+ ) -> Result < TlsStream < TcpStream > , async_native_tls:: Error > {
8484 async_native_tls:: connect ( host, stream) . await
8585}
8686
87- #[ cfg( feature = "h1_client_rustls " ) ]
87+ #[ cfg( feature = "rustls " ) ]
8888async fn add_tls ( host : & str , stream : TcpStream ) -> Result < TlsStream < TcpStream > , std:: io:: Error > {
8989 let connector = async_tls:: TlsConnector :: default ( ) ;
9090 connector. connect ( host, stream) . await
0 commit comments