Skip to content

Commit 9d3bcb9

Browse files
committed
io: make ReadReady, io_async::BufRead, and WriteReady super traits
1 parent 1ffedc7 commit 9d3bcb9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

embedded-io-async/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ pub trait Read: ErrorType {
8282
/// Async buffered reader.
8383
///
8484
/// This trait is the `embedded-io-async` equivalent of [`std::io::BufRead`].
85-
pub trait BufRead: ErrorType {
85+
pub trait BufRead: Read {
8686
/// Return the contents of the internal buffer, filling it with more data from the inner reader if it is empty.
8787
///
8888
/// If no bytes are currently available to read, this function waits until at least one byte is available.

embedded-io/src/lib.rs

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

0 commit comments

Comments
 (0)