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

Enable clippy's or_fun_call linter #7222

Merged
merged 3 commits into from
Mar 19, 2024
Merged

Conversation

jtraglia
Copy link
Contributor

This PR enables the or_fun_call linter and fixes its findings.

Why is this bad?

The function will always be called. This is only bad if it allocates or does some non-trivial amount of work.

Several of these fixes are for simple, trivial functions but fixed anyway for consistency.

@shekhirin shekhirin added the C-debt Refactor of code section that is hard to understand or maintain label Mar 19, 2024
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is pretty useful, nice

@shekhirin shekhirin enabled auto-merge March 19, 2024 15:43
@shekhirin shekhirin added this pull request to the merge queue Mar 19, 2024
Merged via the queue into paradigmxyz:main with commit 11bedc1 Mar 19, 2024
27 checks passed
@jtraglia jtraglia deleted the or_fun_call branch March 19, 2024 16:31
Ruteri pushed a commit to Ruteri/reth that referenced this pull request Apr 17, 2024
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Ruteri pushed a commit to Ruteri/reth that referenced this pull request Apr 17, 2024
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-debt Refactor of code section that is hard to understand or maintain
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants