File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
crates/stackable-webhook/src/tls Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
//! This module contains structs and functions to easily create a TLS termination
2
2
//! server, which can be used in combination with an Axum [`Router`].
3
- use std:: { net:: SocketAddr , sync:: Arc } ;
3
+ use std:: { convert :: Infallible , net:: SocketAddr , sync:: Arc } ;
4
4
5
5
use axum:: {
6
6
Router ,
@@ -169,7 +169,8 @@ impl TlsServer {
169
169
170
170
// Here, the connect info is extracted by calling Tower's Service
171
171
// trait function on `IntoMakeServiceWithConnectInfo`
172
- let tower_service = router. call( remote_addr) . await . unwrap( ) ;
172
+ let tower_service: Result <_, Infallible > = router. call( remote_addr) . await ;
173
+ let tower_service = tower_service. expect( "Infallible error can never happen" ) ;
173
174
174
175
let span = tracing:: debug_span!( "accept tcp connection" ) ;
175
176
tokio:: spawn( async move {
You can’t perform that action at this time.
0 commit comments