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

remove wildcard from match #61

Merged
merged 1 commit into from
Sep 18, 2023
Merged

remove wildcard from match #61

merged 1 commit into from
Sep 18, 2023

Conversation

leshow
Copy link
Collaborator

@leshow leshow commented Sep 1, 2023

I somehow missed this but there is a footgun in use Enum::* when coupled with a match statement. If you remove a variant, then what was a branch turns into a variable and can cause the match case to fall through.

It's likely you'd get a clippy lint or something on the result, but it seems far safer to just not use wildcard imports on a match.

@leshow leshow merged commit 9595376 into master Sep 18, 2023
18 checks passed
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