Skip to content

Commit

Permalink
resolve concerns
Browse files Browse the repository at this point in the history
  • Loading branch information
hellow554 committed Jun 27, 2022
1 parent f36e3e1 commit cfeed52
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/quick.rs
Expand Up @@ -258,7 +258,9 @@ where
let mut it = get_it();

for _ in 0..(counts.len() - 1) {
assert!(it.next().is_some(), "Iterator shouldn't be finished, may not be deterministic");
if it.next().is_none() {
panic!("Iterator shouldn't be finished, may not be deterministic");
}
}

if it.next().is_none() {
Expand Down Expand Up @@ -1546,7 +1548,8 @@ quickcheck! {
fn counts(nums: Vec<isize>) -> TestResult {
let counts = nums.iter().counts();
for (&item, &count) in counts.iter() {
if count == 0 {
#[allow(clippy::absurd_extreme_comparisons)]
if count <= 0 {
return TestResult::failed();
}
if count != nums.iter().filter(|&x| x == item).count() {
Expand Down

0 comments on commit cfeed52

Please sign in to comment.