summary refs log tree commit diff
path: root/library/std/src/io/impls.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-02-15 07:52:03 +0000
committerbors <bors@rust-lang.org>2025-02-15 07:52:03 +0000
commit8c07d140e00dfa5b0988754051d07d8a91ff01f7 (patch)
tree4cf6fec2957bc4d341be61ea49271da6ce69cf95 /library/std/src/io/impls.rs
parentf77247ac59b29ce927f4d2cd1c26a4b2d1d358c9 (diff)
parentba89ea8add87522ac0a1158d36edd7d2301cc2bd (diff)
downloadrust-8c07d140e00dfa5b0988754051d07d8a91ff01f7.tar.gz
rust-8c07d140e00dfa5b0988754051d07d8a91ff01f7.zip
Auto merge of #137065 - jhpratt:rollup-ree9mej, r=jhpratt
Rollup of 9 pull requests

Successful merges:

 - #135687 (re-export `FromCoroutine` from `core::iter`)
 - #135813 (CI: split i686-mingw job to three free runners)
 - #136749 (Implement Extend<AsciiChar> for String)
 - #136879 (Add safe new() to NotAllOnes)
 - #136978 (Windows: Update generated bindings)
 - #137028 (mir_build: Clarify some code for lowering `hir::PatExpr` to THIR)
 - #137029 (Remove unnecessary check code in unused_delims)
 - #137056 (made check_argument_compat public for use in miri)
 - #137062 (Forward all default methods for I/O impls)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src/io/impls.rs')
-rw-r--r--library/std/src/io/impls.rs62
1 files changed, 62 insertions, 0 deletions
diff --git a/library/std/src/io/impls.rs b/library/std/src/io/impls.rs
index b952c85addf..8239b29884e 100644
--- a/library/std/src/io/impls.rs
+++ b/library/std/src/io/impls.rs
@@ -45,6 +45,7 @@ impl<R: Read + ?Sized> Read for &mut R {
     fn read_exact(&mut self, buf: &mut [u8]) -> io::Result<()> {
         (**self).read_exact(buf)
     }
+
     #[inline]
     fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> io::Result<()> {
         (**self).read_buf_exact(cursor)
@@ -78,6 +79,11 @@ impl<W: Write + ?Sized> Write for &mut W {
     }
 
     #[inline]
+    fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> io::Result<()> {
+        (**self).write_all_vectored(bufs)
+    }
+
+    #[inline]
     fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> io::Result<()> {
         (**self).write_fmt(fmt)
     }
@@ -90,9 +96,24 @@ impl<S: Seek + ?Sized> Seek for &mut S {
     }
 
     #[inline]
+    fn rewind(&mut self) -> io::Result<()> {
+        (**self).rewind()
+    }
+
+    #[inline]
+    fn stream_len(&mut self) -> io::Result<u64> {
+        (**self).stream_len()
+    }
+
+    #[inline]
     fn stream_position(&mut self) -> io::Result<u64> {
         (**self).stream_position()
     }
+
+    #[inline]
+    fn seek_relative(&mut self, offset: i64) -> io::Result<()> {
+        (**self).seek_relative(offset)
+    }
 }
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<B: BufRead + ?Sized> BufRead for &mut B {
@@ -107,11 +128,21 @@ impl<B: BufRead + ?Sized> BufRead for &mut B {
     }
 
     #[inline]
+    fn has_data_left(&mut self) -> io::Result<bool> {
+        (**self).has_data_left()
+    }
+
+    #[inline]
     fn read_until(&mut self, byte: u8, buf: &mut Vec<u8>) -> io::Result<usize> {
         (**self).read_until(byte, buf)
     }
 
     #[inline]
+    fn skip_until(&mut self, byte: u8) -> io::Result<usize> {
+        (**self).skip_until(byte)
+    }
+
+    #[inline]
     fn read_line(&mut self, buf: &mut String) -> io::Result<usize> {
         (**self).read_line(buf)
     }
@@ -153,6 +184,7 @@ impl<R: Read + ?Sized> Read for Box<R> {
     fn read_exact(&mut self, buf: &mut [u8]) -> io::Result<()> {
         (**self).read_exact(buf)
     }
+
     #[inline]
     fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> io::Result<()> {
         (**self).read_buf_exact(cursor)
@@ -186,6 +218,11 @@ impl<W: Write + ?Sized> Write for Box<W> {
     }
 
     #[inline]
+    fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> io::Result<()> {
+        (**self).write_all_vectored(bufs)
+    }
+
+    #[inline]
     fn write_fmt(&mut self, fmt: fmt::Arguments<'_>) -> io::Result<()> {
         (**self).write_fmt(fmt)
     }
@@ -198,9 +235,24 @@ impl<S: Seek + ?Sized> Seek for Box<S> {
     }
 
     #[inline]
+    fn rewind(&mut self) -> io::Result<()> {
+        (**self).rewind()
+    }
+
+    #[inline]
+    fn stream_len(&mut self) -> io::Result<u64> {
+        (**self).stream_len()
+    }
+
+    #[inline]
     fn stream_position(&mut self) -> io::Result<u64> {
         (**self).stream_position()
     }
+
+    #[inline]
+    fn seek_relative(&mut self, offset: i64) -> io::Result<()> {
+        (**self).seek_relative(offset)
+    }
 }
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<B: BufRead + ?Sized> BufRead for Box<B> {
@@ -215,11 +267,21 @@ impl<B: BufRead + ?Sized> BufRead for Box<B> {
     }
 
     #[inline]
+    fn has_data_left(&mut self) -> io::Result<bool> {
+        (**self).has_data_left()
+    }
+
+    #[inline]
     fn read_until(&mut self, byte: u8, buf: &mut Vec<u8>) -> io::Result<usize> {
         (**self).read_until(byte, buf)
     }
 
     #[inline]
+    fn skip_until(&mut self, byte: u8) -> io::Result<usize> {
+        (**self).skip_until(byte)
+    }
+
+    #[inline]
     fn read_line(&mut self, buf: &mut String) -> io::Result<usize> {
         (**self).read_line(buf)
     }