@@ -566,6 +566,7 @@ pin_project! {
566
566
///
567
567
/// The returned future will resolve to both the I/O stream and the buffer
568
568
/// as well as the number of bytes read once the read operation is completed.
569
+ #[ cfg( test) ]
569
570
fn read < ' a , R > ( reader : & ' a mut R , buf : & ' a mut [ u8 ] ) -> ReadFut < ' a , R >
570
571
where
571
572
R : Read + Unpin + ?Sized ,
@@ -587,6 +588,7 @@ where
587
588
}
588
589
}
589
590
591
+ #[ cfg( test) ]
590
592
trait ReadExt : Read {
591
593
/// Pulls some bytes from this source into the specified buffer,
592
594
/// returning how many bytes were read.
@@ -608,6 +610,7 @@ pin_project! {
608
610
609
611
/// Tries to write some bytes from the given `buf` to the writer in an
610
612
/// asynchronous manner, returning a future.
613
+ #[ cfg( test) ]
611
614
fn write < ' a , W > ( writer : & ' a mut W , buf : & ' a [ u8 ] ) -> WriteFut < ' a , W >
612
615
where
613
616
W : Write + Unpin + ?Sized ,
@@ -627,6 +630,7 @@ where
627
630
}
628
631
}
629
632
633
+ #[ cfg( test) ]
630
634
trait WriteExt : Write {
631
635
/// Writes a buffer into this writer, returning how many bytes were
632
636
/// written.
@@ -638,6 +642,7 @@ trait WriteExt: Write {
638
642
}
639
643
}
640
644
645
+ #[ cfg( test) ]
641
646
impl < R > ReadExt for Pin < & mut TimeoutReader < R > >
642
647
where
643
648
R : Read ,
@@ -647,6 +652,7 @@ where
647
652
}
648
653
}
649
654
655
+ #[ cfg( test) ]
650
656
impl < W > WriteExt for Pin < & mut TimeoutWriter < W > >
651
657
where
652
658
W : Write ,
@@ -656,6 +662,7 @@ where
656
662
}
657
663
}
658
664
665
+ #[ cfg( test) ]
659
666
impl < S > ReadExt for Pin < & mut TimeoutStream < S > >
660
667
where
661
668
S : Read + Write ,
@@ -665,6 +672,7 @@ where
665
672
}
666
673
}
667
674
675
+ #[ cfg( test) ]
668
676
impl < S > WriteExt for Pin < & mut TimeoutStream < S > >
669
677
where
670
678
S : Read + Write ,
0 commit comments