We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f36e3e1 commit cfeed52Copy full SHA for cfeed52
tests/quick.rs
@@ -258,7 +258,9 @@ where
258
let mut it = get_it();
259
260
for _ in 0..(counts.len() - 1) {
261
- assert!(it.next().is_some(), "Iterator shouldn't be finished, may not be deterministic");
+ if it.next().is_none() {
262
+ panic!("Iterator shouldn't be finished, may not be deterministic");
263
+ }
264
}
265
266
if it.next().is_none() {
@@ -1546,7 +1548,8 @@ quickcheck! {
1546
1548
fn counts(nums: Vec<isize>) -> TestResult {
1547
1549
let counts = nums.iter().counts();
1550
for (&item, &count) in counts.iter() {
- if count == 0 {
1551
+ #[allow(clippy::absurd_extreme_comparisons)]
1552
+ if count <= 0 {
1553
return TestResult::failed();
1554
1555
if count != nums.iter().filter(|&x| x == item).count() {
0 commit comments