Skip to content

Commit d88cce2

Browse files
committed
Add a link to read in the read_exact doc about the guarantees
1 parent 1fa54ad commit d88cce2

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
@@ -741,7 +741,9 @@ pub trait Read {
741741
/// No guarantees are provided about the contents of `buf` when this
742742
/// function is called, implementations cannot rely on any property of the
743743
/// contents of `buf` being true. It is recommended that implementations
744-
/// only write data to `buf` instead of reading its contents.
744+
/// only write data to `buf` instead of reading its contents. The
745+
/// documentation on [`read`] has a more detailed explanation on this
746+
/// subject.
745747
///
746748
/// # Errors
747749
///
@@ -764,6 +766,7 @@ pub trait Read {
764766
///
765767
/// [`File`]s implement `Read`:
766768
///
769+
/// [`read`]: trait.Read.html#tymethod.read
767770
/// [`File`]: ../fs/struct.File.html
768771
/// [`ErrorKind::Interrupted`]: ../../std/io/enum.ErrorKind.html#variant.Interrupted
769772
/// [`ErrorKind::UnexpectedEof`]: ../../std/io/enum.ErrorKind.html#variant.UnexpectedEof

0 commit comments

Comments
 (0)