Skip to content

Commit

Permalink
Rollup merge of #74486 - poliorcetics:read-exact-doc-point-to-read, r…
Browse files Browse the repository at this point in the history
…=Mark-Simulacrum

Improve Read::read_exact documentation

Fixes #72186.

For now I simply added a link to `Read::read` and held off changing the text in `Read::read_exact`. I can do it if it is deemed necessary.

@rustbot modify labels: C-enhancement, T-libs
  • Loading branch information
Manishearth authored Jul 20, 2020
2 parents d527c7d + 471dd52 commit 03a4727
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libstd/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,9 @@ pub trait Read {
/// No guarantees are provided about the contents of `buf` when this
/// function is called, implementations cannot rely on any property of the
/// contents of `buf` being true. It is recommended that implementations
/// only write data to `buf` instead of reading its contents.
/// only write data to `buf` instead of reading its contents. The
/// documentation on [`read`] has a more detailed explanation on this
/// subject.
///
/// # Errors
///
Expand All @@ -745,6 +747,7 @@ pub trait Read {
///
/// [`File`]s implement `Read`:
///
/// [`read`]: Read::read
/// [`File`]: crate::fs::File
///
/// ```no_run
Expand Down

0 comments on commit 03a4727

Please sign in to comment.