Skip to content

Commit c46519e

Browse files
committed
chore: Apply Clippy lint set_contains_or_insert
1 parent 11823df commit c46519e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

testnet/stacks-node/src/neon_node.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,14 +1240,13 @@ impl BlockMinerThread {
12401240
let index_block_hash =
12411241
StacksBlockId::new(&tip.consensus_hash, &tip.anchored_block_hash);
12421242

1243-
if !considered.contains(&index_block_hash) {
1243+
if considered.insert(index_block_hash) {
12441244
let burn_height = burn_db
12451245
.get_consensus_hash_height(&tip.consensus_hash)
12461246
.expect("FATAL: could not query burnchain block height")
12471247
.expect("FATAL: no burnchain block height for Stacks tip");
12481248
let candidate = TipCandidate::new(tip, burn_height);
12491249
candidates.push(candidate);
1250-
considered.insert(index_block_hash);
12511250
}
12521251
}
12531252
}

0 commit comments

Comments
 (0)