diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2015-09-30 14:51:55 -0400 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2015-09-30 14:51:55 -0400 |
| commit | 66d07d0d3f0091ec46a8dfff37737ff807b202d4 (patch) | |
| tree | 39d60a12040371ae2a4a8f3bdd0ba10184426e67 /src/libstd | |
| parent | 64796d150cadef851138a53fa39de09946a1a740 (diff) | |
| parent | 367f46d7931db1871c7eb5f6bece64c1f2467b18 (diff) | |
| download | rust-66d07d0d3f0091ec46a8dfff37737ff807b202d4.tar.gz rust-66d07d0d3f0091ec46a8dfff37737ff807b202d4.zip | |
Rollup merge of #28762 - steveklabnik:gh28073, r=nikomatsakis
Fixes #28073
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 54869807cac..a76755dadd3 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -370,6 +370,13 @@ fn read_to_end<R: Read + ?Sized>(r: &mut R, buf: &mut Vec<u8>) -> Result<usize> /// throughout `std::io` take and provide types which implement the `Read` /// trait. /// +/// Please note that each call to `read` may involve a system call, and +/// therefore, using something that implements [`BufRead`][bufread], such as +/// [`BufReader`][bufreader], will be more efficient. +/// +/// [bufread]: trait.BufRead.html +/// [bufreader]: struct.BufReader.html +/// /// # Examples /// /// [`File`][file]s implement `Read`: |
