diff --git a/crates/node/src/txvalidation/event.rs b/crates/node/src/txvalidation/event.rs index 3f276472..db9fdec3 100644 --- a/crates/node/src/txvalidation/event.rs +++ b/crates/node/src/txvalidation/event.rs @@ -311,7 +311,7 @@ impl TxEvent { ret_tx.insert(0, tx); ret_tx }) - .unwrap_or(vec![]); + .unwrap_or_default(); Ok(new_txs) } diff --git a/crates/node/src/types/transaction.rs b/crates/node/src/types/transaction.rs index 24b8331e..6a8cb622 100644 --- a/crates/node/src/types/transaction.rs +++ b/crates/node/src/types/transaction.rs @@ -220,10 +220,7 @@ impl Payload { } pub fn is_run_payload(&self) -> bool { - match self { - Payload::Run { .. } => true, - _ => false, - } + matches!(self, Payload::Run { .. }) } pub fn serialize_into(&self, buf: &mut Vec) {