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 committed Mar 19, 2024
1 parent 28157f0 commit 757ddf5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ clippy.derive_partial_eq_without_eq = "deny"
clippy.redundant_clone = "deny"
clippy.trait_duplication_in_bounds = "deny"
clippy.uninlined_format_args = "deny"
clippy.branches_sharing_code = "deny"

[workspace.package]
version = "0.2.0-beta.3"
Expand Down
3 changes: 1 addition & 2 deletions crates/transaction-pool/src/pool/pending.rs
Original file line number Diff line number Diff line change
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 757ddf5

Please sign in to comment.