about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-27 05:21:17 +0100
committerGitHub <noreply@github.com>2024-03-27 05:21:17 +0100
commit910e23bbbba24ea359811cf1f281dfc73d84c828 (patch)
tree6097c4c98597e9e9cae7824e4575e21e2d66a140
parentd589021b4b538b3dbb3f2a5203408352679f2e12 (diff)
parentbff13e98ad61b060ddb7c6c9afc9d1738af95804 (diff)
downloadrust-910e23bbbba24ea359811cf1f281dfc73d84c828.tar.gz
rust-910e23bbbba24ea359811cf1f281dfc73d84c828.zip
Rollup merge of #123084 - a1phyr:unixstream_read_buf, r=workingjubilee
`UnixStream`: override `read_buf`

Split from #122441

r? ``@workingjubilee``
-rw-r--r--library/std/src/os/unix/net/stream.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/library/std/src/os/unix/net/stream.rs b/library/std/src/os/unix/net/stream.rs
index d67493aaf4d..9b01d232611 100644
--- a/library/std/src/os/unix/net/stream.rs
+++ b/library/std/src/os/unix/net/stream.rs
@@ -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)
     }