1
Fork 0

Deduplicates io::Write implementations

This commit is contained in:
Federico Ponzi 2020-09-11 11:11:34 +02:00
parent 28db5214d2
commit ec7f9b927f
No known key found for this signature in database
GPG key ID: CFA9CCFE5363D0C6
2 changed files with 18 additions and 18 deletions

View file

@ -246,19 +246,19 @@ pub struct ChildStdin {
#[stable(feature = "process", since = "1.0.0")]
impl Write for ChildStdin {
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
self.inner.write(buf)
(&*self).write(buf)
}
fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> io::Result<usize> {
self.inner.write_vectored(bufs)
(&*self).write_vectored(bufs)
}
fn is_write_vectored(&self) -> bool {
self.inner.is_write_vectored()
io::Write::is_write_vectored(&&*self)
}
fn flush(&mut self) -> io::Result<()> {
Ok(())
(&*self).flush()
}
}