File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -102,20 +102,19 @@ where
102102 return Box :: pin ( async move { Err ( Box :: new ( err) . into ( ) ) } ) ;
103103 }
104104 } ;
105- let connecting_future = self . http . call ( dst) ;
106105
107- let f = async move {
106+ let connecting_future = self . http . call ( dst) ;
107+ Box :: pin ( async move {
108108 let tcp = connecting_future
109109 . await
110110 . map_err ( Into :: into) ?;
111- let connector = TlsConnector :: from ( cfg) ;
112- let tls = connector
113- . connect ( hostname, tcp)
114- . await
115- . map_err ( |e| io:: Error :: new ( io:: ErrorKind :: Other , e) ) ?;
116- Ok ( MaybeHttpsStream :: Https ( tls) )
117- } ;
118- Box :: pin ( f)
111+ Ok ( MaybeHttpsStream :: Https (
112+ TlsConnector :: from ( cfg)
113+ . connect ( hostname, tcp)
114+ . await
115+ . map_err ( |e| io:: Error :: new ( io:: ErrorKind :: Other , e) ) ?,
116+ ) )
117+ } )
119118 }
120119}
121120
You can’t perform that action at this time.
0 commit comments