Skip to content

Commit ffaa68f

Browse files
authored
chore: make clippy happy (foundry-rs#9601)
* chore: make clippy happy * allow literals tring with formatting args global
1 parent 0caabdd commit ffaa68f

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ uninlined-format-args = "warn"
4444
use-self = "warn"
4545
redundant-clone = "warn"
4646
octal-escapes = "allow"
47+
# until <https://github.com/rust-lang/rust-clippy/issues/13885> is fixed
48+
literal-string-with-formatting-args = "allow"
4749

4850
[workspace.lints.rust]
4951
rust-2018-idioms = "warn"

crates/anvil/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ impl NodeConfig {
800800
/// Sets the `fork_chain_id` to use to fork off local cache from
801801
#[must_use]
802802
pub fn with_fork_chain_id(mut self, fork_chain_id: Option<U256>) -> Self {
803-
self.fork_chain_id = fork_chain_id.map(Into::into);
803+
self.fork_chain_id = fork_chain_id;
804804
self
805805
}
806806

crates/anvil/src/eth/backend/db.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ impl From<Block> for SerializableBlock {
482482
Self {
483483
header: block.header,
484484
transactions: block.transactions.into_iter().map(Into::into).collect(),
485-
ommers: block.ommers.into_iter().map(Into::into).collect(),
485+
ommers: block.ommers.into_iter().collect(),
486486
}
487487
}
488488
}
@@ -492,7 +492,7 @@ impl From<SerializableBlock> for Block {
492492
Self {
493493
header: block.header,
494494
transactions: block.transactions.into_iter().map(Into::into).collect(),
495-
ommers: block.ommers.into_iter().map(Into::into).collect(),
495+
ommers: block.ommers.into_iter().collect(),
496496
}
497497
}
498498
}

0 commit comments

Comments
 (0)