-
Notifications
You must be signed in to change notification settings - Fork 108
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
Added unreachable macro to alleged unreachable code rather than using hidden default value #169
Conversation
… hidden default value
No need to worry, it's impossible to fall in that case... as long as Lines 475 to 487 in e75a55f
It could be interesting to add a comment on that method to say it should never return |
IMO this is good, it's usually better to fail early and detect these kind of bugs instead of failing silently and causing problems in other areas that are hard to track back. |
I agree, still it's something to note about this innocent-looking two-line PR ;) |
Should I add that as part of this PR? |
Yes please! |
Idk if the way I did it works, but it was the best I could think of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good :)
@Sheepyhead Please run |
Head branch was pushed to by a user without write access
… hidden default value (#169) * Added unreachable macro to alleged unreachable code rather than using hidden default value * Added comment warning * Fixed formatting Co-authored-by: Troels Peter Jessen <trojes@tuta.io>
Objective
Fixes #168
Context
This doesn't seem to panic any tests, but this still confers a risk to users that this code has actually been reached by some edge cases, where it would simply fail silently before.
Feedback wanted