Skip to content

simplify cortex-m-types error handling - #710

Open
robamu wants to merge 2 commits into
mainfrom
simplify-cortex-m-types-errors
Open

robamu wants to merge 2 commits into
mainfrom
simplify-cortex-m-types-errors

Conversation

@robamu

@robamu robamu commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Updated and simplified error handling as suggested by @Dirbaio : There are dedicated error types for each trait now. Those are just unit errors.

The error is now a ZST. This removes the distinction between cases like an out-of-range error and an invalid number. But the distinction might not be worth a more complex error type.

@robamu
robamu requested review from Dirbaio and adamgreig November 10, 2026 09:57

@Dirbaio Dirbaio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

💯

(maybe a single "Invalid" error instead of 3 would be simpler? doesn't make much of a difference tho)

@robamu

robamu commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

yeah, why not simplify it even further? I wonder if we should still include the number in the error, but i guess the caller has access to it anyway.

@robamu
robamu marked this pull request as ready for review November 10, 2026 19:08
@robamu
robamu requested a review from Dirbaio November 10, 2026 19:08
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