diff --git a/tests/quick.rs b/tests/quick.rs index 58616f7ca..5c73d20a9 100644 --- a/tests/quick.rs +++ b/tests/quick.rs @@ -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() { @@ -1546,7 +1548,8 @@ quickcheck! { fn counts(nums: Vec) -> 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() {