File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -458,12 +458,16 @@ impl fmt::Debug for Sender {
458458
459459#[ cfg( test) ]
460460mod tests {
461+ #[ cfg( all( feature = "http1" , any( feature = "client" , feature = "server" ) ) ) ]
461462 use std:: mem;
463+ #[ cfg( all( feature = "http1" , any( feature = "client" , feature = "server" ) ) ) ]
462464 use std:: task:: Poll ;
463465
466+ #[ cfg( all( feature = "http1" , any( feature = "client" , feature = "server" ) ) ) ]
464467 use super :: { Body , Incoming , SizeHint } ;
465468 #[ cfg( all( feature = "http1" , any( feature = "client" , feature = "server" ) ) ) ]
466469 use super :: { DecodedLength , Sender } ;
470+ #[ cfg( all( feature = "http1" , any( feature = "client" , feature = "server" ) ) ) ]
467471 use http_body_util:: BodyExt ;
468472
469473 #[ cfg( all( feature = "http1" , any( feature = "client" , feature = "server" ) ) ) ]
Original file line number Diff line number Diff line change @@ -14,7 +14,11 @@ pub(crate) struct Rewind<T> {
1414}
1515
1616impl < T > Rewind < T > {
17- #[ cfg( test) ]
17+ #[ cfg( all(
18+ test,
19+ any( feature = "client" , feature = "server" ) ,
20+ any( feature = "http1" , feature = "http2" )
21+ ) ) ]
1822 pub ( crate ) fn new ( io : T ) -> Self {
1923 Rewind {
2024 pre : None ,
@@ -29,7 +33,11 @@ impl<T> Rewind<T> {
2933 }
3034 }
3135
32- #[ cfg( test) ]
36+ #[ cfg( all(
37+ test,
38+ any( feature = "client" , feature = "server" ) ,
39+ any( feature = "http1" , feature = "http2" )
40+ ) ) ]
3341 pub ( crate ) fn rewind ( & mut self , bs : Bytes ) {
3442 debug_assert ! ( self . pre. is_none( ) ) ;
3543 self . pre = Some ( bs) ;
You can’t perform that action at this time.
0 commit comments