Rollup merge of #74486 - poliorcetics:read-exact-doc-point-to-read, r=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
This commit is contained in:
Manish Goregaokar 2020-07-19 19:12:33 -07:00 committed by GitHub
commit 03a47279d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
///
@ -745,6 +747,7 @@ pub trait Read {
///
/// [`File`]s implement `Read`:
///
/// [`read`]: Read::read
/// [`File`]: crate::fs::File
///
/// ```no_run