Skip to content

Commit ef35b78

Browse files
committed
Provide write_fmt for StdoutLock and StderrLock
1 parent e06dfe3 commit ef35b78

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

library/std/src/io/stdio.rs

+6
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,9 @@ impl Write for StdoutLock<'_> {
820820
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> io::Result<()> {
821821
self.inner.borrow_mut().write_all_vectored(bufs)
822822
}
823+
fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> io::Result<()> {
824+
self.inner.borrow_mut().write_fmt(fmt)
825+
}
823826
}
824827

825828
#[stable(feature = "std_debug", since = "1.16.0")]
@@ -1052,6 +1055,9 @@ impl Write for StderrLock<'_> {
10521055
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> io::Result<()> {
10531056
self.inner.borrow_mut().write_all_vectored(bufs)
10541057
}
1058+
fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> io::Result<()> {
1059+
self.inner.borrow_mut().write_fmt(fmt)
1060+
}
10551061
}
10561062

10571063
#[stable(feature = "std_debug", since = "1.16.0")]

0 commit comments

Comments
 (0)