From 73ab1eb06bcfaa0368a07b84a054bdd2f4f84f06 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=BF=97=E5=AE=87?= Date: Thu, 10 Jul 2025 03:04:24 +0000 Subject: [PATCH] chore(bitcoind_rpc): Make clippy happy --- crates/bitcoind_rpc/src/lib.rs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/crates/bitcoind_rpc/src/lib.rs b/crates/bitcoind_rpc/src/lib.rs index ac0d190c..2c2ca35a 100644 --- a/crates/bitcoind_rpc/src/lib.rs +++ b/crates/bitcoind_rpc/src/lib.rs @@ -141,12 +141,10 @@ where } } - let mut mempool_event = MempoolEvent::default(); - - mempool_event.update = rpc_mempool - .into_iter() - .filter_map({ - |txid| -> Option> { + let mut mempool_event = MempoolEvent { + update: rpc_mempool + .into_iter() + .filter_map(|txid| -> Option> { let tx = match self.mempool_snapshot.get(&txid) { Some(tx) => tx.clone(), None => match client.get_raw_transaction(&txid, None) { @@ -160,9 +158,10 @@ where }, }; Some(Ok((tx, sync_time))) - } - }) - .collect::, _>>()?; + }) + .collect::, _>>()?, + ..Default::default() + }; let at_tip = rpc_tip_height == self.last_cp.height() as u64 && rpc_tip_hash == self.last_cp.hash(); -- 2.49.0