File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -258,7 +258,9 @@ where
258
258
let mut it = get_it ( ) ;
259
259
260
260
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
+ }
262
264
}
263
265
264
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( ) ;
1548
1550
for ( & item, & count) in counts. iter( ) {
1549
- if count == 0 {
1551
+ #[ allow( clippy:: absurd_extreme_comparisons) ]
1552
+ if count <= 0 {
1550
1553
return TestResult :: failed( ) ;
1551
1554
}
1552
1555
if count != nums. iter( ) . filter( |& x| x == item) . count( ) {
You can’t perform that action at this time.
0 commit comments