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

[Refactor] make NodeError exhaustive #111

Open
alexmozaidze opened this issue Jul 30, 2024 · 0 comments
Open

[Refactor] make NodeError exhaustive #111

alexmozaidze opened this issue Jul 30, 2024 · 0 comments

Comments

@alexmozaidze
Copy link
Contributor

alexmozaidze commented Jul 30, 2024

Non-exhaustive tag on an error enum means that the user is forced to add a wildcard saying "if I didn't account for other errors then do X", where "X" is most likely a runtime panic, which is not ideal, especially in cases where the user actually wants the compiler to ensure that he covered all possible cases of failure.

Non-exhaustive enums are mainly for configuration enums and such, where items are likely to be added and a missing case is no big deal, which does not apply to errors.

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

No branches or pull requests

1 participant