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

Fix clippy lints #23

Merged
merged 2 commits into from
Oct 16, 2022
Merged

Fix clippy lints #23

merged 2 commits into from
Oct 16, 2022

Conversation

rillian
Copy link
Contributor

@rillian rillian commented Sep 20, 2022

  • Remove unnecessary reference
  • Use #[non_exhaustive]annotation ondotenvy::Error` enum

The second one is technically an incompatible API change. However, the whole point of the __Nonexhaustive variant pattern is to get callers to include a wildcard branch when matching, so you could argue it doesn't require a semver bump: anyone referring to that variant explicitly was doing it wrong. But I don't know if that's the normal expectation; this pattern is new to me.

LineParser::substitution_data is already `&mut` so there's no
need to create a reference before passing.

Addresses a clippy issue.
The #[non_exhaustive] attribute achieves the same compatibility
reservations as a dummy variant without requiring code to
handle that variant.

Addresses a clippy issue.
@allan2 allan2 merged commit 9d0f3de into allan2:master Oct 16, 2022
@rillian rillian deleted the clippy branch October 16, 2022 05:29
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.

2 participants