Skip to content

Commit 73ab1eb

Browse files
committed
chore(bitcoind_rpc): Make clippy happy
1 parent 7e894f4 commit 73ab1eb

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

crates/bitcoind_rpc/src/lib.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,10 @@ where
141141
}
142142
}
143143

144-
let mut mempool_event = MempoolEvent::default();
145-
146-
mempool_event.update = rpc_mempool
147-
.into_iter()
148-
.filter_map({
149-
|txid| -> Option<Result<_, bitcoincore_rpc::Error>> {
144+
let mut mempool_event = MempoolEvent {
145+
update: rpc_mempool
146+
.into_iter()
147+
.filter_map(|txid| -> Option<Result<_, bitcoincore_rpc::Error>> {
150148
let tx = match self.mempool_snapshot.get(&txid) {
151149
Some(tx) => tx.clone(),
152150
None => match client.get_raw_transaction(&txid, None) {
@@ -160,9 +158,10 @@ where
160158
},
161159
};
162160
Some(Ok((tx, sync_time)))
163-
}
164-
})
165-
.collect::<Result<Vec<_>, _>>()?;
161+
})
162+
.collect::<Result<Vec<_>, _>>()?,
163+
..Default::default()
164+
};
166165

167166
let at_tip =
168167
rpc_tip_height == self.last_cp.height() as u64 && rpc_tip_hash == self.last_cp.hash();

0 commit comments

Comments
 (0)