Skip to content

Commit 4949c74

Browse files
committed
io: remove Read/Write supertrait for ReadReady/WriteReady.
`ReadReady`/`WriteReady` are shared between blocking and async (the embedded-io-async crate just reexports them) so they shouldn't have the blocking `Read`/`Write` as supertraits.
1 parent a926c2a commit 4949c74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

embedded-io/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ pub trait Seek: ErrorType {
530530
///
531531
/// This allows using a [`Read`] or [`BufRead`] in a nonblocking fashion, i.e. trying to read
532532
/// only when it is ready.
533-
pub trait ReadReady: Read {
533+
pub trait ReadReady: ErrorType {
534534
/// Get whether the reader is ready for immediately reading.
535535
///
536536
/// This usually means that there is either some bytes have been received and are buffered and ready to be read,
@@ -544,7 +544,7 @@ pub trait ReadReady: Read {
544544
///
545545
/// This allows using a [`Write`] in a nonblocking fashion, i.e. trying to write
546546
/// only when it is ready.
547-
pub trait WriteReady: Write {
547+
pub trait WriteReady: ErrorType {
548548
/// Get whether the writer is ready for immediately writing.
549549
///
550550
/// This usually means that there is free space in the internal transmit buffer.

0 commit comments

Comments
 (0)