File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
tonic/src/transport/service Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -302,6 +302,7 @@ grpc-web = [
302
302
" dep:bytes" ,
303
303
" dep:http" ,
304
304
" dep:hyper" ,
305
+ " dep:hyper-util" ,
305
306
" dep:tracing-subscriber" ,
306
307
" dep:tower" ,
307
308
]
@@ -315,15 +316,16 @@ tracing = ["dep:tracing", "dep:tracing-subscriber"]
315
316
# "dep:warp",
316
317
# ]
317
318
# hyper-warp-multiplex = ["hyper-warp"]
318
- uds = [" tokio-stream/net" , " dep:tower" , " dep:hyper" ]
319
+ uds = [" tokio-stream/net" , " dep:tower" , " dep:hyper" , " dep:hyper-util " ]
319
320
streaming = [" tokio-stream" , " dep:h2" ]
320
321
mock = [" tokio-stream" , " dep:tower" , " dep:hyper-util" ]
321
- tower = [" dep:hyper" , " dep:tower" , " dep:http" ]
322
+ tower = [" dep:hyper" , " dep:hyper-util " , " dep: tower" , " dep:http" ]
322
323
json-codec = [" dep:serde" , " dep:serde_json" , " dep:bytes" ]
323
324
compression = [" tonic/gzip" ]
324
325
tls = [" tonic/tls" ]
325
326
tls-rustls = [
326
327
" dep:hyper" ,
328
+ " dep:hyper-util" ,
327
329
" dep:hyper-rustls" ,
328
330
" dep:tower" ,
329
331
" tower-http/util" ,
Original file line number Diff line number Diff line change
1
+ #[ cfg( feature = "tls" ) ]
1
2
use std:: fmt;
3
+
2
4
use std:: task:: { Context , Poll } ;
3
5
4
6
use http:: Uri ;
@@ -102,14 +104,17 @@ where
102
104
}
103
105
104
106
/// Error returned when trying to connect to an HTTPS endpoint without TLS enabled.
107
+ #[ cfg( feature = "tls" ) ]
105
108
#[ derive( Debug ) ]
106
109
pub ( crate ) struct HttpsUriWithoutTlsSupport ( ( ) ) ;
107
110
111
+ #[ cfg( feature = "tls" ) ]
108
112
impl fmt:: Display for HttpsUriWithoutTlsSupport {
109
113
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
110
114
write ! ( f, "Connecting to HTTPS without TLS enabled" )
111
115
}
112
116
}
113
117
114
118
// std::error::Error only requires a type to impl Debug and Display
119
+ #[ cfg( feature = "tls" ) ]
115
120
impl std:: error:: Error for HttpsUriWithoutTlsSupport { }
You can’t perform that action at this time.
0 commit comments