Skip to content

Commit 390f717

Browse files
committed
tweak wording
1 parent 1c12b1b commit 390f717

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libstd/io/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -509,10 +509,10 @@ pub trait Read {
509509
/// contents of `buf` being true. It is recommended that *implementations*
510510
/// only write data to `buf` instead of reading its contents.
511511
///
512-
/// Correspondingly, however, *users* of this trait may not assume any guarantees
512+
/// Correspondingly, however, *callers* of this method may not assume any guarantees
513513
/// about how the implementation uses `buf`. The trait is safe to implement,
514-
/// so it is perfectly possible that the implementation might inspect that data.
515-
/// As a caller, it is your responsibility to make sure that `buf` is initialized
514+
// so it is possible that the code that's supposed to write to the buffer might also read
515+
// from it. It is your responsibility to make sure that `buf` is initialized
516516
/// before calling `read`. Calling `read` with an uninitialized `buf` (of the kind one
517517
/// obtains via [`MaybeUninit<T>`]) is not safe, and can lead to undefined behavior.
518518
///

0 commit comments

Comments
 (0)