about summary refs log tree commit diff
path: root/src/libstd/io/stdio.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-08-30 05:59:49 +0000
committerbors <bors@rust-lang.org>2015-08-30 05:59:49 +0000
commit4bb90232daab451cf58359e0c5874bc905d2f101 (patch)
tree3c58214650cd1c8c3cee6575d6ac2cb59cbdcf2e /src/libstd/io/stdio.rs
parent2f749254cafd4940243548730afc02c5410611bf (diff)
parent73e7a7269553f661501d54c1fe8c57aa12b126fa (diff)
downloadrust-4bb90232daab451cf58359e0c5874bc905d2f101.tar.gz
rust-4bb90232daab451cf58359e0c5874bc905d2f101.zip
Auto merge of #27588 - cesarb:read_all, r=alexcrichton
This implements the proposed "read_exact" RFC (https://github.com/rust-lang/rfcs/pull/980).

Tracking issue: https://github.com/rust-lang/rust/issues/27585
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 e60bdcf0ec6..c2110ef1d83 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")]