itertools
itertools copied to clipboard
Migrate to edition 2021
I noted 5 months ago that edition 2021 requires rustc 1.56+ so it's now possible. Is there any reason to not update?
Codecov Report
:x: Patch coverage is 94.44444% with 1 line in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 93.65%. Comparing base (6814180) to head (fde1ad9).
:warning: Report is 168 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/adaptors/mod.rs | 91.66% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #967 +/- ##
==========================================
- Coverage 94.38% 93.65% -0.74%
==========================================
Files 48 50 +2
Lines 6665 6323 -342
==========================================
- Hits 6291 5922 -369
- Misses 374 401 +27
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
I added some marginal changes:
- MSRV automated in the crate documentation (valid for a MSRV >= 1.63.0).
- Fix some additional clippy lints, mostly related to the recent MSRV/edition changes.
- Use
ControlFlow?!
@jswrenn
I remember your https://github.com/rust-itertools/itertools/pull/780#discussion_r1352664093 where you prefered ControlFlow over Result, I replaced some, left some aside for now.
Can you elaborate on the reason?
I remember your #780 (comment) where you prefered
ControlFlowoverResult, I replaced some, left some aside for now. Can you elaborate on the reason?
Result::Err denotes "something went wrong"; ControlFlow::Break doesn't. Favor ControlFlow when we're trying to encode conditional iteration without judgement about error-ness, and favor Result when you're specifically dealing with an early return due to error.
@Philippe-Cholet is this good to merge?
haha, it's been nearly ten months since the 2024 Edition was released. Maybe we can migrate a bit more