@@ -87,6 +87,11 @@ impl Read for StdinRaw {
8787 self . 0 . read_vectored ( bufs)
8888 }
8989
90+ #[ inline]
91+ fn can_read_vectored ( & self ) -> bool {
92+ self . 0 . can_read_vectored ( )
93+ }
94+
9095 #[ inline]
9196 unsafe fn initializer ( & self ) -> Initializer {
9297 Initializer :: nop ( )
@@ -101,6 +106,11 @@ impl Write for StdoutRaw {
101106 self . 0 . write_vectored ( bufs)
102107 }
103108
109+ #[ inline]
110+ fn can_write_vectored ( & self ) -> bool {
111+ self . 0 . can_write_vectored ( )
112+ }
113+
104114 fn flush ( & mut self ) -> io:: Result < ( ) > {
105115 self . 0 . flush ( )
106116 }
@@ -114,6 +124,11 @@ impl Write for StderrRaw {
114124 self . 0 . write_vectored ( bufs)
115125 }
116126
127+ #[ inline]
128+ fn can_write_vectored ( & self ) -> bool {
129+ self . 0 . can_write_vectored ( )
130+ }
131+
117132 fn flush ( & mut self ) -> io:: Result < ( ) > {
118133 self . 0 . flush ( )
119134 }
@@ -140,6 +155,14 @@ impl<W: io::Write> io::Write for Maybe<W> {
140155 }
141156 }
142157
158+ #[ inline]
159+ fn can_write_vectored ( & self ) -> bool {
160+ match self {
161+ Maybe :: Real ( w) => w. can_write_vectored ( ) ,
162+ Maybe :: Fake => true ,
163+ }
164+ }
165+
143166 fn flush ( & mut self ) -> io:: Result < ( ) > {
144167 match * self {
145168 Maybe :: Real ( ref mut w) => handle_ebadf ( w. flush ( ) , ( ) ) ,
@@ -162,6 +185,14 @@ impl<R: io::Read> io::Read for Maybe<R> {
162185 Maybe :: Fake => Ok ( 0 ) ,
163186 }
164187 }
188+
189+ #[ inline]
190+ fn can_read_vectored ( & self ) -> bool {
191+ match self {
192+ Maybe :: Real ( w) => w. can_read_vectored ( ) ,
193+ Maybe :: Fake => true ,
194+ }
195+ }
165196}
166197
167198fn handle_ebadf < T > ( r : io:: Result < T > , default : T ) -> io:: Result < T > {
@@ -352,6 +383,10 @@ impl Read for Stdin {
352383 self . lock ( ) . read_vectored ( bufs)
353384 }
354385 #[ inline]
386+ fn can_read_vectored ( & self ) -> bool {
387+ self . lock ( ) . can_read_vectored ( )
388+ }
389+ #[ inline]
355390 unsafe fn initializer ( & self ) -> Initializer {
356391 Initializer :: nop ( )
357392 }
@@ -376,6 +411,11 @@ impl Read for StdinLock<'_> {
376411 self . inner . read_vectored ( bufs)
377412 }
378413
414+ #[ inline]
415+ fn can_read_vectored ( & self ) -> bool {
416+ self . inner . can_read_vectored ( )
417+ }
418+
379419 #[ inline]
380420 unsafe fn initializer ( & self ) -> Initializer {
381421 Initializer :: nop ( )
@@ -543,6 +583,10 @@ impl Write for Stdout {
543583 fn write_vectored ( & mut self , bufs : & [ IoSlice < ' _ > ] ) -> io:: Result < usize > {
544584 self . lock ( ) . write_vectored ( bufs)
545585 }
586+ #[ inline]
587+ fn can_write_vectored ( & self ) -> bool {
588+ self . lock ( ) . can_write_vectored ( )
589+ }
546590 fn flush ( & mut self ) -> io:: Result < ( ) > {
547591 self . lock ( ) . flush ( )
548592 }
@@ -561,6 +605,10 @@ impl Write for StdoutLock<'_> {
561605 fn write_vectored ( & mut self , bufs : & [ IoSlice < ' _ > ] ) -> io:: Result < usize > {
562606 self . inner . borrow_mut ( ) . write_vectored ( bufs)
563607 }
608+ #[ inline]
609+ fn can_write_vectored ( & self ) -> bool {
610+ self . inner . borrow_mut ( ) . can_write_vectored ( )
611+ }
564612 fn flush ( & mut self ) -> io:: Result < ( ) > {
565613 self . inner . borrow_mut ( ) . flush ( )
566614 }
@@ -709,6 +757,10 @@ impl Write for Stderr {
709757 fn write_vectored ( & mut self , bufs : & [ IoSlice < ' _ > ] ) -> io:: Result < usize > {
710758 self . lock ( ) . write_vectored ( bufs)
711759 }
760+ #[ inline]
761+ fn can_write_vectored ( & self ) -> bool {
762+ self . lock ( ) . can_write_vectored ( )
763+ }
712764 fn flush ( & mut self ) -> io:: Result < ( ) > {
713765 self . lock ( ) . flush ( )
714766 }
@@ -727,6 +779,10 @@ impl Write for StderrLock<'_> {
727779 fn write_vectored ( & mut self , bufs : & [ IoSlice < ' _ > ] ) -> io:: Result < usize > {
728780 self . inner . borrow_mut ( ) . write_vectored ( bufs)
729781 }
782+ #[ inline]
783+ fn can_write_vectored ( & self ) -> bool {
784+ self . inner . borrow_mut ( ) . can_write_vectored ( )
785+ }
730786 fn flush ( & mut self ) -> io:: Result < ( ) > {
731787 self . inner . borrow_mut ( ) . flush ( )
732788 }
0 commit comments