@@ -586,6 +586,32 @@ impl fmt::Debug for Stdout {
586
586
587
587
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
588
588
impl Write for Stdout {
589
+ fn write ( & mut self , buf : & [ u8 ] ) -> io:: Result < usize > {
590
+ ( & * self ) . write ( buf)
591
+ }
592
+ fn write_vectored ( & mut self , bufs : & [ IoSlice < ' _ > ] ) -> io:: Result < usize > {
593
+ ( & * self ) . write_vectored ( bufs)
594
+ }
595
+ #[ inline]
596
+ fn is_write_vectored ( & self ) -> bool {
597
+ io:: Write :: is_write_vectored ( & & * self )
598
+ }
599
+ fn flush ( & mut self ) -> io:: Result < ( ) > {
600
+ ( & * self ) . flush ( )
601
+ }
602
+ fn write_all ( & mut self , buf : & [ u8 ] ) -> io:: Result < ( ) > {
603
+ ( & * self ) . write_all ( buf)
604
+ }
605
+ fn write_all_vectored ( & mut self , bufs : & mut [ IoSlice < ' _ > ] ) -> io:: Result < ( ) > {
606
+ ( & * self ) . write_all_vectored ( bufs)
607
+ }
608
+ fn write_fmt ( & mut self , args : fmt:: Arguments < ' _ > ) -> io:: Result < ( ) > {
609
+ ( & * self ) . write_fmt ( args)
610
+ }
611
+ }
612
+
613
+ #[ stable( feature = "write_mt" , since = "1.48.0" ) ]
614
+ impl Write for & Stdout {
589
615
fn write ( & mut self , buf : & [ u8 ] ) -> io:: Result < usize > {
590
616
self . lock ( ) . write ( buf)
591
617
}
@@ -609,6 +635,7 @@ impl Write for Stdout {
609
635
self . lock ( ) . write_fmt ( args)
610
636
}
611
637
}
638
+
612
639
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
613
640
impl Write for StdoutLock < ' _ > {
614
641
fn write ( & mut self , buf : & [ u8 ] ) -> io:: Result < usize > {
@@ -762,6 +789,32 @@ impl fmt::Debug for Stderr {
762
789
763
790
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
764
791
impl Write for Stderr {
792
+ fn write ( & mut self , buf : & [ u8 ] ) -> io:: Result < usize > {
793
+ ( & * self ) . write ( buf)
794
+ }
795
+ fn write_vectored ( & mut self , bufs : & [ IoSlice < ' _ > ] ) -> io:: Result < usize > {
796
+ ( & * self ) . write_vectored ( bufs)
797
+ }
798
+ #[ inline]
799
+ fn is_write_vectored ( & self ) -> bool {
800
+ io:: Write :: is_write_vectored ( & & * self )
801
+ }
802
+ fn flush ( & mut self ) -> io:: Result < ( ) > {
803
+ ( & * self ) . flush ( )
804
+ }
805
+ fn write_all ( & mut self , buf : & [ u8 ] ) -> io:: Result < ( ) > {
806
+ ( & * self ) . write_all ( buf)
807
+ }
808
+ fn write_all_vectored ( & mut self , bufs : & mut [ IoSlice < ' _ > ] ) -> io:: Result < ( ) > {
809
+ ( & * self ) . write_all_vectored ( bufs)
810
+ }
811
+ fn write_fmt ( & mut self , args : fmt:: Arguments < ' _ > ) -> io:: Result < ( ) > {
812
+ ( & * self ) . write_fmt ( args)
813
+ }
814
+ }
815
+
816
+ #[ stable( feature = "write_mt" , since = "1.48.0" ) ]
817
+ impl Write for & Stderr {
765
818
fn write ( & mut self , buf : & [ u8 ] ) -> io:: Result < usize > {
766
819
self . lock ( ) . write ( buf)
767
820
}
@@ -785,6 +838,7 @@ impl Write for Stderr {
785
838
self . lock ( ) . write_fmt ( args)
786
839
}
787
840
}
841
+
788
842
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
789
843
impl Write for StderrLock < ' _ > {
790
844
fn write ( & mut self , buf : & [ u8 ] ) -> io:: Result < usize > {
0 commit comments