Rollup merge of #123084 - a1phyr:unixstream_read_buf, r=workingjubilee

`UnixStream`: override `read_buf`

Split from #122441

r? ``@workingjubilee``
This commit is contained in:
Matthias Krüger 2024-03-27 05:21:17 +01:00 committed by GitHub
commit 910e23bbbb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -580,6 +580,10 @@ impl io::Read for UnixStream {
io::Read::read(&mut &*self, buf)
}
fn read_buf(&mut self, buf: io::BorrowedCursor<'_>) -> io::Result<()> {
io::Read::read_buf(&mut &*self, buf)
}
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result<usize> {
io::Read::read_vectored(&mut &*self, bufs)
}
@ -596,6 +600,10 @@ impl<'a> io::Read for &'a UnixStream {
self.0.read(buf)
}
fn read_buf(&mut self, buf: io::BorrowedCursor<'_>) -> io::Result<()> {
self.0.read_buf(buf)
}
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result<usize> {
self.0.read_vectored(bufs)
}