Address review feedback

This commit is contained in:
ivmarkov 2024-09-08 07:51:22 +00:00
parent f3558ac6f1
commit d745418436
2 changed files with 8 additions and 4 deletions

View File

@ -28,8 +28,10 @@ pub trait Read: ErrorType {
/// If bytes are available to read:
/// - A non-zero amount of bytes is read to the beginning of `buf`, and the amount is returned immediately,
/// *without waiting for more bytes to become available*;
/// - It is not guaranteed that *all* available bytes are returned, it is possible for the implementation to
/// read an amount of bytes less than `buf.len()` while there are more bytes immediately available.
///
/// Note that once some bytes are available to read, it is *not* guaranteed that all available bytes are returned.
/// It is possible for the implementation to read an amount of bytes less than `buf.len()` while there are more
/// bytes immediately available.
///
/// This waiting behavior is important for the cases where `Read` represents the "read" leg of a pipe-like
/// protocol (a socket, a pipe, a serial line etc.). The semantics is that the caller - by passing a non-empty

View File

@ -309,8 +309,10 @@ pub trait Read: ErrorType {
/// If bytes are available to read:
/// - A non-zero amount of bytes is read to the beginning of `buf`, and the amount is returned immediately,
/// *without blocking and waiting for more bytes to become available*;
/// - It is not guaranteed that *all* available bytes are returned, it is possible for the implementation to
/// read an amount of bytes less than `buf.len()` while there are more bytes immediately available.
///
/// Note that once some bytes are available to read, it is *not* guaranteed that all available bytes are returned.
/// It is possible for the implementation to read an amount of bytes less than `buf.len()` while there are more
/// bytes immediately available.
///
/// This blocking behavior is important for the cases where `Read` represents the "read" leg of a pipe-like
/// protocol (a socket, a pipe, a serial line etc.). The semantics is that the caller - by passing a non-empty