Skip to content

Conversation

Anders429
Copy link
Contributor

This expands the core::error::Error implementations for both embedded_io::ReadExactError and embedded_io::WriteFmtError to implement the source() function to return the underlying error contained in the Other variant.

Note that this changes the bounds for the core::error::Error implementations to both types to require E: core::error::Error + 'static, but in practice this shouldn't cause many issues since using both Read::read_exact() and Write::write_fmt() relies on the ErrorType trait, which requires its Error to implement core::error::Error. Technically this is a breaking change, and would possibly break places where someone is constructing these error types outside of the context of the io traits.

@Anders429 Anders429 requested a review from a team as a code owner October 7, 2025 17:31
Copy link
Member

@Dirbaio Dirbaio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, very nice! :)

@Dirbaio Dirbaio added this pull request to the merge queue Oct 7, 2025
Merged via the queue into rust-embedded:master with commit fbb5c79 Oct 7, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants