Skip to content

Commit d745418

Browse files
committed
Address review feedback
1 parent f3558ac commit d745418

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

embedded-io-async/src/lib.rs

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

embedded-io/src/lib.rs

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

0 commit comments

Comments
 (0)