File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -257,7 +257,8 @@ enum Stream {
257257 #[ cfg( all( feature = "native-tls" , not( feature = "rustls" ) ) ) ]
258258 Tls ( tokio_native_tls:: TlsStream < TcpStream > ) ,
259259 #[ cfg( feature = "rustls" ) ]
260- Tls ( tokio_rustls:: client:: TlsStream < TcpStream > ) ,
260+ // Box for large variant
261+ Tls ( Box < tokio_rustls:: client:: TlsStream < TcpStream > > ) ,
261262 #[ cfg( unix) ]
262263 Unix ( tokio:: net:: UnixStream ) ,
263264 #[ cfg( feature = "vsock" ) ]
@@ -500,7 +501,7 @@ impl Client {
500501 stream : S ,
501502 url : & Url ,
502503 is_http2 : bool ,
503- ) -> Result < tokio_rustls:: client:: TlsStream < S > , ClientError >
504+ ) -> Result < Box < tokio_rustls:: client:: TlsStream < S > > , ClientError >
504505 where
505506 S : AsyncRead + AsyncWrite + Unpin ,
506507 {
@@ -511,7 +512,7 @@ impl Client {
511512 ) ?;
512513 let stream = connector. connect ( domain. to_owned ( ) , stream) . await ?;
513514
514- Ok ( stream)
515+ Ok ( Box :: new ( stream) )
515516 }
516517
517518 async fn client_http1 < R : Rng > (
You can’t perform that action at this time.
0 commit comments