Skip to content

Commit 66d07d0

Browse files
committed
Rollup merge of #28762 - steveklabnik:gh28073, r=nikomatsakis
Fixes #28073
2 parents 64796d1 + 367f46d commit 66d07d0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/libstd/io/mod.rs

+7
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,13 @@ fn read_to_end<R: Read + ?Sized>(r: &mut R, buf: &mut Vec<u8>) -> Result<usize>
370370
/// throughout `std::io` take and provide types which implement the `Read`
371371
/// trait.
372372
///
373+
/// Please note that each call to `read` may involve a system call, and
374+
/// therefore, using something that implements [`BufRead`][bufread], such as
375+
/// [`BufReader`][bufreader], will be more efficient.
376+
///
377+
/// [bufread]: trait.BufRead.html
378+
/// [bufreader]: struct.BufReader.html
379+
///
373380
/// # Examples
374381
///
375382
/// [`File`][file]s implement `Read`:

0 commit comments

Comments
 (0)