Skip to content

Commit 03a4727

Browse files
authored
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
2 parents d527c7d + 471dd52 commit 03a4727

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/libstd/io/mod.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,9 @@ pub trait Read {
722722
/// No guarantees are provided about the contents of `buf` when this
723723
/// function is called, implementations cannot rely on any property of the
724724
/// contents of `buf` being true. It is recommended that implementations
725-
/// only write data to `buf` instead of reading its contents.
725+
/// only write data to `buf` instead of reading its contents. The
726+
/// documentation on [`read`] has a more detailed explanation on this
727+
/// subject.
726728
///
727729
/// # Errors
728730
///
@@ -745,6 +747,7 @@ pub trait Read {
745747
///
746748
/// [`File`]s implement `Read`:
747749
///
750+
/// [`read`]: Read::read
748751
/// [`File`]: crate::fs::File
749752
///
750753
/// ```no_run

0 commit comments

Comments
 (0)