From d7454184366fdbefb590bdee0cb7a8a21ce4e886 Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Sun, 8 Sep 2024 07:51:22 +0000 Subject: [PATCH] Address review feedback --- embedded-io-async/src/lib.rs | 6 ++++-- embedded-io/src/lib.rs | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/embedded-io-async/src/lib.rs b/embedded-io-async/src/lib.rs index 0fb8a25..eef50eb 100644 --- a/embedded-io-async/src/lib.rs +++ b/embedded-io-async/src/lib.rs @@ -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 diff --git a/embedded-io/src/lib.rs b/embedded-io/src/lib.rs index a9abf9f..f050abb 100644 --- a/embedded-io/src/lib.rs +++ b/embedded-io/src/lib.rs @@ -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