rust-itertools / itertools

Extra iterator adaptors, iterator methods, free functions, and macros.
https://docs.rs/itertools/
Apache License 2.0
2.76k stars 309 forks source link

`assert_equal`: fix `clippy::default_numeric_fallback` #932

Closed Philippe-Cholet closed 6 months ago

Philippe-Cholet commented 6 months ago

Type of i defaults to i32 when usize should be used. It's only a problem if this function is called with two iterators longer than i32::MAX. It seems unlikely to me but who knows? i32 should not be the default integer type in the library. usize would have more sense so I add the lint as warning (for the library only, it's okay in tests and benchmarks).

See lint doc: https://rust-lang.github.io/rust-clippy/master/index.html#/default_numeric_fallback

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.53%. Comparing base (6814180) to head (fa94ba1). Report is 79 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #932 +/- ## ========================================== + Coverage 94.38% 94.53% +0.14% ========================================== Files 48 48 Lines 6665 6947 +282 ========================================== + Hits 6291 6567 +276 - Misses 374 380 +6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.