@@ -586,6 +586,32 @@ impl fmt::Debug for Stdout {
586586
587587#[ stable( feature = "rust1" , since = "1.0.0" ) ]
588588impl 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 {
589615 fn write ( & mut self , buf : & [ u8 ] ) -> io:: Result < usize > {
590616 self . lock ( ) . write ( buf)
591617 }
@@ -609,6 +635,7 @@ impl Write for Stdout {
609635 self . lock ( ) . write_fmt ( args)
610636 }
611637}
638+
612639#[ stable( feature = "rust1" , since = "1.0.0" ) ]
613640impl Write for StdoutLock < ' _ > {
614641 fn write ( & mut self , buf : & [ u8 ] ) -> io:: Result < usize > {
@@ -762,6 +789,32 @@ impl fmt::Debug for Stderr {
762789
763790#[ stable( feature = "rust1" , since = "1.0.0" ) ]
764791impl 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 {
765818 fn write ( & mut self , buf : & [ u8 ] ) -> io:: Result < usize > {
766819 self . lock ( ) . write ( buf)
767820 }
@@ -785,6 +838,7 @@ impl Write for Stderr {
785838 self . lock ( ) . write_fmt ( args)
786839 }
787840}
841+
788842#[ stable( feature = "rust1" , since = "1.0.0" ) ]
789843impl Write for StderrLock < ' _ > {
790844 fn write ( & mut self , buf : & [ u8 ] ) -> io:: Result < usize > {
0 commit comments