Skip to content

feat: add some clippy lint - #10479

Merged
mattsse merged 3 commits into
foundry-rs:masterfrom
taikoonwang:lint/cloned_instead_of_copied
Jun 5, 2025
Merged

mattsse merged 3 commits into
foundry-rs:masterfrom
taikoonwang:lint/cloned_instead_of_copied

Conversation

@taikoonwang

@taikoonwang taikoonwang commented May 9, 2025 •

Copy link
Copy Markdown
Contributor

Motivation

closes #10149
torward: #10150

The above PR involved too many linting rules, so this time I want to split it into smaller PRs, similar to reth. Each PR will contain around 5 linting rules to make reviewing easier.

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

mattsse
mattsse previously approved these changes May 9, 2025

@mattsse mattsse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

these lgtm, pending @DaniPopes @grandizzy

Comment thread crates/anvil/src/eth/backend/mem/mod.rs Outdated
Comment thread crates/evm/fuzz/src/strategies/param.rs Outdated
Comment thread crates/fmt/src/formatter.rs Outdated
@taikoonwang
taikoonwang force-pushed the lint/cloned_instead_of_copied branch from 5919830 to bd4445d Compare May 13, 2025 09:17
@taikoonwang

Copy link
Copy Markdown
Contributor Author

@grandizzy fixed some conflicts, plz review again

let mut log_index = 0;
let mut gas_used = 0;
let mut transactions = Vec::with_capacity(calls.len());
let mut receipts = Vec::new();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

warning: collection is never read
    --> crates/anvil/src/eth/backend/mem/mod.rs:1537:17
     |
1537 |                 let mut receipts = Vec::new();

@grandizzy grandizzy Jun 5, 2025 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

yep, looks like a leftover, added in 026b351 but not used anywhere @mattsse any insights if this should have been used?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

also wondering this, the rest of the changes LGTM

@grandizzy grandizzy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this lgtm, thank you, pending @mattsse @zerosnacks

@grandizzy
grandizzy requested review from mattsse and zerosnacks June 5, 2025 10:35

@mattsse mattsse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

seems fine, lets send

ty

@mattsse
mattsse merged commit b3fe111 into foundry-rs:master Jun 5, 2025
@github-project-automation github-project-automation Bot moved this to Done in Foundry Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

chore: enable more clippy lint

4 participants