File tree Expand file tree Collapse file tree
crates/stackable-webhook/src/tls Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11//! This module contains structs and functions to easily create a TLS termination
22//! 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 } ;
44
55use axum:: {
66 Router ,
@@ -169,7 +169,8 @@ impl TlsServer {
169169
170170 // Here, the connect info is extracted by calling Tower's Service
171171 // 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" ) ;
173174
174175 let span = tracing:: debug_span!( "accept tcp connection" ) ;
175176 tokio:: spawn( async move {
You can’t perform that action at this time.
0 commit comments