Skip to content

Commit

Permalink
BFT-464: oneliner counting
Browse files Browse the repository at this point in the history
  • Loading branch information
aakoshh committed May 23, 2024
1 parent 018299e commit 225b04c
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions node/actors/bft/src/testonly/twins/scenario.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,5 @@ pub fn unique_key_count<T>(nodes: &[T]) -> usize
where
T: HasKey,
{
let mut seen = BTreeSet::new();
let mut cnt = 0;
for n in nodes {
if seen.insert(n.key()) {
cnt += 1;
}
}
cnt
nodes.iter().map(|n| n.key()).collect::<BTreeSet<_>>().len()
}

0 comments on commit 225b04c

Please sign in to comment.