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

Make clippy more pedantic #484

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
Draft

Conversation

jan-ferdinand
Copy link
Member

Fix common stylistic oddities.

Each commit fixes one lint (or a small number of identical-in-spirit lints) to simplify their reversion, in case there are controversies.

@jan-ferdinand jan-ferdinand changed the title chore: Make clippy more pedantic Make clippy more pedantic Mar 5, 2025
Usually, this means deriving. Manual implementations are the exception.

changelog: ignore
The pattern `if foo { return; } else { bar(); }` is more canonically
expressed as `if foo { return; } bar();`

changelog: ignore
It is easier to read `if foo { bar() } else { baz() }` than it is to
read `if !foo { baz() } else { bar() }`.

changelog: ignore
@jan-ferdinand jan-ferdinand force-pushed the jfs/more_pedantic_clippy_pr branch from dad46b0 to dd08e41 Compare March 5, 2025 23:51
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