We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6437122 commit b8d0c2fCopy full SHA for b8d0c2f
src/connector.rs
@@ -70,16 +70,8 @@ where
70
};
71
72
if scheme == &http::uri::Scheme::HTTP && !self.force_https {
73
- let connecting_future = self.http.call(dst);
74
-
75
- let f = async move {
76
- let tcp = connecting_future
77
- .await
78
- .map_err(Into::into)?;
79
80
- Ok(MaybeHttpsStream::Http(tcp))
81
- };
82
- Box::pin(f)
+ let future = self.http.call(dst);
+ Box::pin(async move { Ok(MaybeHttpsStream::Http(future.await.map_err(Into::into)?)) })
83
} else if scheme == &http::uri::Scheme::HTTPS {
84
let cfg = self.tls_config.clone();
85
let mut hostname = match self.override_server_name.as_deref() {
0 commit comments