Skip to content

Commit cfeed52

Browse files
committed
resolve concerns
1 parent f36e3e1 commit cfeed52

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/quick.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,9 @@ where
258258
let mut it = get_it();
259259

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

264266
if it.next().is_none() {
@@ -1546,7 +1548,8 @@ quickcheck! {
15461548
fn counts(nums: Vec<isize>) -> TestResult {
15471549
let counts = nums.iter().counts();
15481550
for (&item, &count) in counts.iter() {
1549-
if count == 0 {
1551+
#[allow(clippy::absurd_extreme_comparisons)]
1552+
if count <= 0 {
15501553
return TestResult::failed();
15511554
}
15521555
if count != nums.iter().filter(|&x| x == item).count() {

0 commit comments

Comments
 (0)