Skip to content

Commit

Permalink
Address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Sep 8, 2024
1 parent f3558ac commit d745418
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions embedded-io-async/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions embedded-io/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d745418

Please sign in to comment.