Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error enhancements #128

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Error enhancements #128

wants to merge 5 commits into from

Conversation

chrysn
Copy link
Member

@chrysn chrysn commented Sep 18, 2024

A goal with the NegativeError type is to tell the compiler that all positive values are niches. While that's impossible or at least hard and compile time heavy, advertising the niche at 0 to the compiler is easy enough.

Along with this comes a documentation extension and minor internal refactorings.

@chrysn
Copy link
Member Author

chrysn commented Sep 18, 2024

Converted to a draft while waiting for RIOT-OS/rust-riot-sys#49 -- then, we can add core::error::Error (with a fallback to numeric representation) here too.

@chrysn
Copy link
Member Author

chrysn commented Sep 18, 2024

Now also implements Display and Error (although the Display implementation is only good if the module tiny_strerror is available)

@chrysn chrysn marked this pull request as ready for review September 18, 2024 16:30
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.

1 participant