Skip to content

Commit

Permalink
Add a debug assert.
Browse files Browse the repository at this point in the history
  • Loading branch information
tolikzinovyev committed Dec 27, 2024
1 parent f6d3a9e commit d212f93
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/simple_lottery/algorithm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ pub(super) fn prove(setup: &Setup, prover_set: &[Element]) -> Option<Proof> {
}
if prover_set.len() as u64 >= setup.proof_size {
element_sequence.sort();

Check warning on line 17 in src/simple_lottery/algorithm.rs

View workflow job for this annotation

GitHub Actions / build

used `sort` on primitive type `array`
// Check that the elements in the sequence are unique.
debug_assert!(element_sequence.is_sorted_by(|a, b| a < b));
return Some(Proof { element_sequence });
}
}
Expand Down

0 comments on commit d212f93

Please sign in to comment.