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

Convert Error enums to Result where possible #77

Merged
merged 2 commits into from
Jan 30, 2025
Merged

Convert Error enums to Result where possible #77

merged 2 commits into from
Jan 30, 2025

Conversation

jschwe
Copy link
Collaborator

@jschwe jschwe commented Jan 30, 2025

For error enums, that are used in function signature, and where the
only Ok value is 0, we map the enum to a Result<(), NonZero<>>
instead, so that we can use the more ergonomic Rust error
handling.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
@jschwe jschwe merged commit d72b6ab into main Jan 30, 2025
28 checks passed
@jschwe jschwe deleted the result branch January 30, 2025 17:33
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