File tree 1 file changed +4
-0
lines changed
tonic/src/transport/service
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ use super::io::BoxedIo;
3
3
#[ cfg( feature = "tls" ) ]
4
4
use super :: tls:: TlsConnector ;
5
5
use http:: Uri ;
6
+ #[ cfg( feature = "tls" ) ]
6
7
use std:: fmt;
7
8
use std:: task:: { Context , Poll } ;
8
9
use tower:: make:: MakeConnection ;
@@ -97,14 +98,17 @@ where
97
98
}
98
99
99
100
/// Error returned when trying to connect to an HTTPS endpoint without TLS enabled.
101
+ #[ cfg( feature = "tls" ) ]
100
102
#[ derive( Debug ) ]
101
103
pub ( crate ) struct HttpsUriWithoutTlsSupport ( ( ) ) ;
102
104
105
+ #[ cfg( feature = "tls" ) ]
103
106
impl fmt:: Display for HttpsUriWithoutTlsSupport {
104
107
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
105
108
write ! ( f, "Connecting to HTTPS without TLS enabled" )
106
109
}
107
110
}
108
111
109
112
// std::error::Error only requires a type to impl Debug and Display
113
+ #[ cfg( feature = "tls" ) ]
110
114
impl std:: error:: Error for HttpsUriWithoutTlsSupport { }
You can’t perform that action at this time.
0 commit comments