Skip to content

Commit 90b22d0

Browse files
authored
Merge pull request #5699 from jbencin/chore/clippy-set-contains-or-insert
chore: Apply Clippy `set_contains_or_insert`
2 parents a077937 + c46519e commit 90b22d0

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
@@ -1239,14 +1239,13 @@ impl BlockMinerThread {
12391239
let index_block_hash =
12401240
StacksBlockId::new(&tip.consensus_hash, &tip.anchored_block_hash);
12411241

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

0 commit comments

Comments
 (0)