@@ -10,9 +10,9 @@ use std::str::Utf8Error;
1010use base64:: DecodeError ;
1111use bufstream:: IntoInnerError as BufError ;
1212use imap_proto:: { types:: ResponseCode , Response } ;
13- #[ cfg( feature = "tls" ) ]
13+ #[ cfg( feature = "native- tls" ) ]
1414use native_tls:: Error as TlsError ;
15- #[ cfg( feature = "tls" ) ]
15+ #[ cfg( feature = "native- tls" ) ]
1616use native_tls:: HandshakeError as TlsHandshakeError ;
1717#[ cfg( feature = "rustls-tls" ) ]
1818use rustls_connector:: HandshakeError as RustlsHandshakeError ;
@@ -62,10 +62,10 @@ pub enum Error {
6262 #[ cfg( feature = "rustls-tls" ) ]
6363 RustlsHandshake ( RustlsHandshakeError < TcpStream > ) ,
6464 /// An error from the `native_tls` library during the TLS handshake.
65- #[ cfg( feature = "tls" ) ]
65+ #[ cfg( feature = "native- tls" ) ]
6666 TlsHandshake ( TlsHandshakeError < TcpStream > ) ,
6767 /// An error from the `native_tls` library while managing the socket.
68- #[ cfg( feature = "tls" ) ]
68+ #[ cfg( feature = "native- tls" ) ]
6969 Tls ( TlsError ) ,
7070 /// A BAD response from the IMAP server.
7171 Bad ( Bad ) ,
@@ -114,14 +114,14 @@ impl From<RustlsHandshakeError<TcpStream>> for Error {
114114 }
115115}
116116
117- #[ cfg( feature = "tls" ) ]
117+ #[ cfg( feature = "native- tls" ) ]
118118impl From < TlsHandshakeError < TcpStream > > for Error {
119119 fn from ( err : TlsHandshakeError < TcpStream > ) -> Error {
120120 Error :: TlsHandshake ( err)
121121 }
122122}
123123
124- #[ cfg( feature = "tls" ) ]
124+ #[ cfg( feature = "native- tls" ) ]
125125impl From < TlsError > for Error {
126126 fn from ( err : TlsError ) -> Error {
127127 Error :: Tls ( err)
@@ -140,9 +140,9 @@ impl fmt::Display for Error {
140140 Error :: Io ( ref e) => fmt:: Display :: fmt ( e, f) ,
141141 #[ cfg( feature = "rustls-tls" ) ]
142142 Error :: RustlsHandshake ( ref e) => fmt:: Display :: fmt ( e, f) ,
143- #[ cfg( feature = "tls" ) ]
143+ #[ cfg( feature = "native- tls" ) ]
144144 Error :: Tls ( ref e) => fmt:: Display :: fmt ( e, f) ,
145- #[ cfg( feature = "tls" ) ]
145+ #[ cfg( feature = "native- tls" ) ]
146146 Error :: TlsHandshake ( ref e) => fmt:: Display :: fmt ( e, f) ,
147147 Error :: Validate ( ref e) => fmt:: Display :: fmt ( e, f) ,
148148 Error :: Parse ( ref e) => fmt:: Display :: fmt ( e, f) ,
@@ -163,9 +163,9 @@ impl StdError for Error {
163163 Error :: Io ( ref e) => e. description ( ) ,
164164 #[ cfg( feature = "rustls-tls" ) ]
165165 Error :: RustlsHandshake ( ref e) => e. description ( ) ,
166- #[ cfg( feature = "tls" ) ]
166+ #[ cfg( feature = "native- tls" ) ]
167167 Error :: Tls ( ref e) => e. description ( ) ,
168- #[ cfg( feature = "tls" ) ]
168+ #[ cfg( feature = "native- tls" ) ]
169169 Error :: TlsHandshake ( ref e) => e. description ( ) ,
170170 Error :: Parse ( ref e) => e. description ( ) ,
171171 Error :: Validate ( ref e) => e. description ( ) ,
@@ -183,9 +183,9 @@ impl StdError for Error {
183183 Error :: Io ( ref e) => Some ( e) ,
184184 #[ cfg( feature = "rustls-tls" ) ]
185185 Error :: RustlsHandshake ( ref e) => Some ( e) ,
186- #[ cfg( feature = "tls" ) ]
186+ #[ cfg( feature = "native- tls" ) ]
187187 Error :: Tls ( ref e) => Some ( e) ,
188- #[ cfg( feature = "tls" ) ]
188+ #[ cfg( feature = "native- tls" ) ]
189189 Error :: TlsHandshake ( ref e) => Some ( e) ,
190190 Error :: Parse ( ParseError :: DataNotUtf8 ( _, ref e) ) => Some ( e) ,
191191 _ => None ,
0 commit comments