Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Commit fcfadd0

Browse files
committed
Fix 'useless_conversion' clippy warning
Signed-off-by: Joseph Livesey <jlivesey@gmail.com>
1 parent a7ec4bd commit fcfadd0

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

validator/src/journal/block_manager.rs

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -653,18 +653,13 @@ impl BlockManager {
653653
}
654654

655655
fn block_contains_any_transaction(&self, block: &Block, ids: &[&String]) -> Option<String> {
656-
let transaction_ids: HashSet<&String> = HashSet::from_iter(
657-
block
658-
.batches
659-
.iter()
660-
.fold(vec![], |mut arr, b| {
661-
for transaction in &b.transactions {
662-
arr.push(&transaction.header_signature)
663-
}
664-
arr
665-
})
666-
.into_iter(),
667-
);
656+
let transaction_ids: HashSet<&String> =
657+
HashSet::from_iter(block.batches.iter().fold(vec![], |mut arr, b| {
658+
for transaction in &b.transactions {
659+
arr.push(&transaction.header_signature)
660+
}
661+
arr
662+
}));
668663
let comparison_transaction_ids: HashSet<&String> = HashSet::from_iter(ids.iter().cloned());
669664
transaction_ids
670665
.intersection(&comparison_transaction_ids)

0 commit comments

Comments
 (0)