File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -257,7 +257,8 @@ enum Stream {
257
257
#[ cfg( all( feature = "native-tls" , not( feature = "rustls" ) ) ) ]
258
258
Tls ( tokio_native_tls:: TlsStream < TcpStream > ) ,
259
259
#[ cfg( feature = "rustls" ) ]
260
- Tls ( tokio_rustls:: client:: TlsStream < TcpStream > ) ,
260
+ // Box for large variant
261
+ Tls ( Box < tokio_rustls:: client:: TlsStream < TcpStream > > ) ,
261
262
#[ cfg( unix) ]
262
263
Unix ( tokio:: net:: UnixStream ) ,
263
264
#[ cfg( feature = "vsock" ) ]
@@ -500,7 +501,7 @@ impl Client {
500
501
stream : S ,
501
502
url : & Url ,
502
503
is_http2 : bool ,
503
- ) -> Result < tokio_rustls:: client:: TlsStream < S > , ClientError >
504
+ ) -> Result < Box < tokio_rustls:: client:: TlsStream < S > > , ClientError >
504
505
where
505
506
S : AsyncRead + AsyncWrite + Unpin ,
506
507
{
@@ -511,7 +512,7 @@ impl Client {
511
512
) ?;
512
513
let stream = connector. connect ( domain. to_owned ( ) , stream) . await ?;
513
514
514
- Ok ( stream)
515
+ Ok ( Box :: new ( stream) )
515
516
}
516
517
517
518
async fn client_http1 < R : Rng > (
You can’t perform that action at this time.
0 commit comments