From 10f1d3e79c8cc362293eabf735d1d67e8e10d614 Mon Sep 17 00:00:00 2001 From: musitdev Date: Tue, 9 Apr 2024 14:49:08 +0200 Subject: [PATCH] correct clippy warn --- crates/node/src/txvalidation/event.rs | 2 +- crates/node/src/types/transaction.rs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) 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) {