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

chore: make clippy happy #13772

Merged
merged 1 commit into from
Jan 11, 2025
Merged

chore: make clippy happy #13772

merged 1 commit into from
Jan 11, 2025

Conversation

fgimenez
Copy link
Member

prevents warnings like these with latest clippy:

warning: this `continue` expression is redundant
   --> crates/ethereum-forks/src/display.rs:163:41
    |
163 |                 ForkCondition::Never => continue,
    |                                         ^^^^^^^^
    |
    = help: consider dropping the `continue` expression
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_continue
    = note: requested on the command line with `-W clippy::needless-continue`
warning: `reth-chainspec` (lib) generated 1 warning
warning: length comparison to zero
   --> crates/trie/sparse/src/trie.rs:820:49
    |
820 | ...                   hash.filter(|_| path.len() == 0),
    |                                       ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `path.is_empty()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
    = note: `#[warn(clippy::len_zero)]` on by default
warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator
    --> crates/storage/provider/src/providers/blockchain_provider.rs:1870:18
     |
1870 |                 .last()
     |                  ^^^^^^ help: try: `next_back()`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last
     = note: `#[warn(clippy::double_ended_iterator_last)]` on by default

@fgimenez fgimenez added the C-debt Refactor of code section that is hard to understand or maintain label Jan 11, 2025
Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

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

lgtm

@mattsse mattsse added this pull request to the merge queue Jan 11, 2025
Merged via the queue into main with commit 5a23708 Jan 11, 2025
44 checks passed
@mattsse mattsse deleted the fgimenez/clippy-happy branch January 11, 2025 11:36
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.

3 participants