Skip to content

Commit 396701e

Browse files
committed
clippy
1 parent 293ef6f commit 396701e

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

crates/services/txpool_v2/src/service.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -329,15 +329,12 @@ where
329329
};
330330
if !removed_transactions.is_empty() {
331331
let mut height_expiration_txs = self.pruner.height_expiration_txs.write();
332-
for tx in removed_transactions {
333-
if let Some(tx) = tx {
334-
let expiration = tx.expiration();
335-
if expiration < u32::MAX.into() {
336-
if let Some(expired_txs) =
337-
height_expiration_txs.get_mut(&expiration)
338-
{
339-
expired_txs.remove(&tx.id());
340-
}
332+
for tx in removed_transactions.into_iter().flatten() {
333+
let expiration = tx.expiration();
334+
if expiration < u32::MAX.into() {
335+
if let Some(expired_txs) = height_expiration_txs.get_mut(&expiration)
336+
{
337+
expired_txs.remove(&tx.id());
341338
}
342339
}
343340
}

0 commit comments

Comments
 (0)