We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a6003bf commit 77fb4f9Copy full SHA for 77fb4f9
src/http/http_client.rs
@@ -20,7 +20,7 @@ pub struct HttpClient {
20
#[derive(Debug)]
21
pub enum ClientStream {
22
Tcp(TcpStream),
23
- Tls(TlsStream<TcpStream>),
+ Tls(Box<TlsStream<TcpStream>>),
24
}
25
26
impl AsyncRead for ClientStream {
@@ -60,7 +60,7 @@ impl HttpClient {
60
let tcp_stream = TcpStream::connect(format!("{}:{}",pared_url.1,pared_url.2)).await?;
61
let stream = if pared_url.2 == 443 {
62
let tls_stream = setup_tls_connector(pared_url.1.clone(),tcp_stream).await;
63
- ClientStream::Tls(tls_stream)
+ ClientStream::Tls(Box::from(tls_stream))
64
} else {
65
ClientStream::Tcp(tcp_stream)
66
};
0 commit comments