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

Merged
merged 5 commits into from
Nov 30, 2024
Merged

Error enhancements #128

merged 5 commits into from
Nov 30, 2024

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 chrysn marked this pull request as draft September 18, 2024 15:53
@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
@chrysn chrysn merged commit fa66f7f into main Nov 30, 2024
81 checks passed
@chrysn chrysn deleted the error-enhancements branch November 30, 2024 14:22
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