We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a6ee2fe commit def00caCopy full SHA for def00ca
src/connector.rs
@@ -102,20 +102,19 @@ where
102
return Box::pin(async move { Err(Box::new(err).into()) });
103
}
104
};
105
- let connecting_future = self.http.call(dst);
106
107
- let f = async move {
+ let connecting_future = self.http.call(dst);
+ Box::pin(async move {
108
let tcp = connecting_future
109
.await
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)
+ Ok(MaybeHttpsStream::Https(
+ TlsConnector::from(cfg)
+ .connect(hostname, tcp)
+ .await
+ .map_err(|e| io::Error::new(io::ErrorKind::Other, e))?,
+ ))
+ })
119
120
121
0 commit comments