1
0
Fork 0
mirror of https://github.com/romanz/electrs.git synced 2025-02-24 15:02:21 +01:00

Remove unneeded into_iter()

This commit is contained in:
Roman Zeyde 2021-07-04 15:08:26 +03:00
parent c754485320
commit 11d703f545

View file

@ -280,10 +280,7 @@ impl Status {
.par_iter()
.flat_map_iter(|outpoint| index.filter_by_spending(*outpoint))
.collect();
self.for_new_blocks(
spending_blockhashes.into_iter(),
daemon,
|blockhash, block| {
self.for_new_blocks(spending_blockhashes, daemon, |blockhash, block| {
let txids: Vec<Txid> = block.txdata.iter().map(|tx| tx.txid()).collect();
for (pos, (tx, txid)) in block.txdata.into_iter().zip(txids.iter()).enumerate() {
let spent_outpoints = filter_inputs(&tx, &outpoints);
@ -299,8 +296,7 @@ impl Status {
.or_default()
.spent = spent_outpoints;
}
},
)?;
})?;
Ok(result
.into_iter()