Skip to content

Commit

Permalink
Enable clippy's branches_sharing_code linter
Browse files Browse the repository at this point in the history
  • Loading branch information
jtraglia authored and onbjerg committed Mar 19, 2024
1 parent 553a271 commit 938343b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
12 changes: 9 additions & 3 deletions Cargo.toml
Expand Up @@ -93,6 +93,7 @@ clippy.redundant_clone = "deny"
clippy.trait_duplication_in_bounds = "deny"
clippy.uninlined_format_args = "deny"
clippy.equatable_if_let = "deny"
clippy.branches_sharing_code = "deny"

[workspace.package]
version = "0.2.0-beta.3"
Expand Down Expand Up @@ -192,8 +193,13 @@ reth-trie = { path = "crates/trie" }
reth-trie-parallel = { path = "crates/trie-parallel" }

# revm
revm = { version = "7.1.0", features = ["std", "secp256k1"], default-features = false }
revm-primitives = { version = "3.0.0", features = ["std"], default-features = false }
revm = { version = "7.1.0", features = [
"std",
"secp256k1",
], default-features = false }
revm-primitives = { version = "3.0.0", features = [
"std",
], default-features = false }
revm-inspectors = { git = "https://github.com/paradigmxyz/evm-inspectors", rev = "f96bc1f" }

# eth
Expand Down Expand Up @@ -237,7 +243,7 @@ strum = "0.26"
rayon = "1.7"
itertools = "0.12"
parking_lot = "0.12"
metrics = "0.21.1" # Needed for `metrics-macro` to resolve the crate using `::metrics` notation
metrics = "0.21.1" # Needed for `metrics-macro` to resolve the crate using `::metrics` notation
hex-literal = "0.4"
once_cell = "1.17"
syn = "2.0"
Expand Down
3 changes: 1 addition & 2 deletions crates/transaction-pool/src/pool/pending.rs
Expand Up @@ -264,13 +264,12 @@ impl<T: TransactionOrdering> PendingPool<T> {
// the transaction already has an ancestor, so we only need to ensure that the
// highest nonces set actually contains the highest nonce for that sender
self.highest_nonces.remove(ancestor);
self.highest_nonces.insert(tx.clone());
} else {
// If there's __no__ ancestor in the pool, then this transaction is independent, this is
// guaranteed because this pool is gapless.
self.independent_transactions.insert(tx.clone());
self.highest_nonces.insert(tx.clone());
}
self.highest_nonces.insert(tx.clone());
}

/// Returns the ancestor the given transaction, the transaction with `nonce - 1`.
Expand Down

0 comments on commit 938343b

Please sign in to comment.