Commit def00ca 1 parent a6ee2fe commit def00ca Copy full SHA for def00ca
File tree 1 file changed +9
-10
lines changed
1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -102,20 +102,19 @@ where
102
102
return Box :: pin ( async move { Err ( Box :: new ( err) . into ( ) ) } ) ;
103
103
}
104
104
} ;
105
- let connecting_future = self . http . call ( dst) ;
106
105
107
- let f = async move {
106
+ let connecting_future = self . http . call ( dst) ;
107
+ Box :: pin ( async move {
108
108
let tcp = connecting_future
109
109
. await
110
110
. 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
+ } )
119
118
}
120
119
}
121
120
You can’t perform that action at this time.
0 commit comments