Skip to content

Commit

Permalink
Removed write_fmt forwarding, to fix recursive borrow issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucretiel committed Jun 17, 2020
1 parent 358dc1d commit b60cefe
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/libstd/io/stdio.rs
Expand Up @@ -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)
}
Expand All @@ -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")]
Expand Down Expand Up @@ -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)
}
Expand All @@ -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")]
Expand Down

0 comments on commit b60cefe

Please sign in to comment.