about summary refs log tree commit diff
path: root/library/std/src/io/cursor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/io/cursor.rs')
-rw-r--r--library/std/src/io/cursor.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/library/std/src/io/cursor.rs b/library/std/src/io/cursor.rs
index 4ef1f1b695e..49dde828c1f 100644
--- a/library/std/src/io/cursor.rs
+++ b/library/std/src/io/cursor.rs
@@ -357,6 +357,13 @@ where
         self.pos += n as u64;
         Ok(())
     }
+
+    fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> io::Result<()> {
+        let n = cursor.capacity();
+        Read::read_buf_exact(&mut self.remaining_slice(), cursor)?;
+        self.pos += n as u64;
+        Ok(())
+    }
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]