rust-itertools / itertools

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

Loosen `Fn` bounds to `FnMut` #886

Closed Philippe-Cholet closed 7 months ago

Philippe-Cholet commented 7 months ago

In #885, I relaxed the Fn bounds to FnMut for the new variants of k_smallest. It lead me to find out this is also possible for diff_with and Itertools::into_group_map_by.

I'm not sure why we would need Fn bounds in our crate. clippy does not have a disallowed_traits lint or I would have added Fn to it.

codecov[bot] commented 7 months ago

Codecov Report

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

Project coverage is 94.57%. Comparing base (6814180) to head (18721ab). Report is 24 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #886 +/- ## ========================================== + Coverage 94.38% 94.57% +0.18% ========================================== Files 48 48 Lines 6665 6750 +85 ========================================== + Hits 6291 6384 +93 + Misses 374 366 -8 ```

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