Removed write_fmt forwarding, to fix recursive borrow issues

This commit is contained in:
Nathan West 2020-06-17 17:56:25 -04:00
parent 358dc1d8c2
commit b60cefee0a

View File

@ -652,9 +652,6 @@ impl Write for Stdout {
fn write_all(&mut self, buf: &[u8]) -> io::Result<()> {
self.lock().write_all(buf)
}
fn write_fmt(&mut self, args: fmt::Arguments<'_>) -> io::Result<()> {
self.lock().write_fmt(args)
}
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> io::Result<()> {
self.lock().write_all_vectored(bufs)
}
@ -680,9 +677,6 @@ impl Write for StdoutLock<'_> {
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> io::Result<()> {
self.inner.borrow_mut().write_all_vectored(bufs)
}
fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> io::Result<()> {
self.inner.borrow_mut().write_fmt(fmt)
}
}
#[stable(feature = "std_debug", since = "1.16.0")]
@ -838,9 +832,6 @@ impl Write for Stderr {
fn write_all(&mut self, buf: &[u8]) -> io::Result<()> {
self.lock().write_all(buf)
}
fn write_fmt(&mut self, args: fmt::Arguments<'_>) -> io::Result<()> {
self.lock().write_fmt(args)
}
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> io::Result<()> {
self.lock().write_all_vectored(bufs)
}
@ -866,9 +857,6 @@ impl Write for StderrLock<'_> {
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> io::Result<()> {
self.inner.borrow_mut().write_all_vectored(bufs)
}
fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> io::Result<()> {
self.inner.borrow_mut().write_fmt(fmt)
}
}
#[stable(feature = "std_debug", since = "1.16.0")]