about summary refs log tree commit diff
path: root/src/libstd/io/stdio.rs
diff options
context:
space:
mode:
authorCesar Eduardo Barros <cesarb@cesarb.eti.br>2015-07-20 00:23:37 -0300
committerCesar Eduardo Barros <cesarb@cesarb.eti.br>2015-08-24 19:10:08 -0300
commitff81920f03866674080ac63b565cc9d30f80c450 (patch)
tree9619a464863630730373297a9a35e7bccba94fcf /src/libstd/io/stdio.rs
parentef04b07239d75f2b6bb66f18855f3af695d76e1c (diff)
downloadrust-ff81920f03866674080ac63b565cc9d30f80c450.tar.gz
rust-ff81920f03866674080ac63b565cc9d30f80c450.zip
Implement read_exact for the Read trait
This implements the proposed "read_exact" RFC
(https://github.com/rust-lang/rfcs/pull/980).
Diffstat (limited to 'src/libstd/io/stdio.rs')
-rw-r--r--src/libstd/io/stdio.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs
index d8b7c8a282c..88f40d764e2 100644
--- a/src/libstd/io/stdio.rs
+++ b/src/libstd/io/stdio.rs
@@ -271,6 +271,9 @@ impl Read for Stdin {
     fn read_to_string(&mut self, buf: &mut String) -> io::Result<usize> {
         self.lock().read_to_string(buf)
     }
+    fn read_exact(&mut self, buf: &mut [u8]) -> io::Result<()> {
+        self.lock().read_exact(buf)
+    }
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]