File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -517,6 +517,11 @@ pub trait Read {
517517 /// reader will *always* no longer be able to produce bytes.
518518 /// 2. The buffer specified was 0 bytes in length.
519519 ///
520+ /// It is not an error if the returned value `n` is smaller than the buffer size,
521+ /// even when the reader is not at the end of the stream yet.
522+ /// This may happen for example because fewer bytes are actually available right now
523+ /// (e. g. being close to end-of-file) or because read() was interrupted by a signal.
524+ ///
520525 /// No guarantees are provided about the contents of `buf` when this
521526 /// function is called, implementations cannot rely on any property of the
522527 /// contents of `buf` being true. It is recommended that *implementations*
You can’t perform that action at this time.
0 commit comments