Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
frisitano committed Dec 2, 2024
1 parent d2c9d32 commit 963eb21
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion crates/net/eth-wire/src/capability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ pub fn shared_capability_offsets(
// If multiple versions are shared of the same (equal name) capability, the numerically
// highest wins, others are ignored
if shared_capabilities
.get(&peer_capability.name).is_none_or(|v| peer_capability.version > v.version)
.get(&peer_capability.name)
.is_none_or(|v| peer_capability.version > v.version)
{
shared_capabilities.insert(
peer_capability.name.clone(),
Expand Down
3 changes: 2 additions & 1 deletion crates/transaction-pool/src/maintain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,8 @@ impl FinalizedBlockTracker {
fn update(&mut self, finalized_block: Option<BlockNumber>) -> Option<BlockNumber> {
let finalized = finalized_block?;
self.last_finalized_block
.replace(finalized).is_none_or(|last| last < finalized)
.replace(finalized)
.is_none_or(|last| last < finalized)
.then_some(finalized)
}
}
Expand Down
3 changes: 2 additions & 1 deletion crates/transaction-pool/src/pool/best.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ impl<T: TransactionOrdering> Iterator for BestTransactionsWithFees<T> {
// the transaction
if best.transaction.max_fee_per_gas() >= self.base_fee as u128 &&
best.transaction
.max_fee_per_blob_gas().is_none_or(|fee| fee >= self.base_fee_per_blob_gas as u128)
.max_fee_per_blob_gas()
.is_none_or(|fee| fee >= self.base_fee_per_blob_gas as u128)
{
return Some(best);
}
Expand Down
6 changes: 4 additions & 2 deletions crates/trie/trie/src/trie_cursor/subnode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,16 @@ impl CursorSubNode {
#[inline]
pub fn state_flag(&self) -> bool {
self.node
.as_ref().is_none_or(|node| self.nibble < 0 || node.state_mask.is_bit_set(self.nibble as u8))
.as_ref()
.is_none_or(|node| self.nibble < 0 || node.state_mask.is_bit_set(self.nibble as u8))
}

/// Returns `true` if the tree flag is set for the current nibble.
#[inline]
pub fn tree_flag(&self) -> bool {
self.node
.as_ref().is_none_or(|node| self.nibble < 0 || node.tree_mask.is_bit_set(self.nibble as u8))
.as_ref()
.is_none_or(|node| self.nibble < 0 || node.tree_mask.is_bit_set(self.nibble as u8))
}

/// Returns `true` if the current nibble has a root hash.
Expand Down

0 comments on commit 963eb21

Please sign in to comment.