Skip to content

Use ControlFlow in fold_while implementation#1107

Merged
phimuemue merged 1 commit into
rust-itertools:masterfrom
scottmcm:master
May 26, 2026
Merged

Use ControlFlow in fold_while implementation#1107
phimuemue merged 1 commit into
rust-itertools:masterfrom
scottmcm:master

Conversation

@scottmcm
Copy link
Copy Markdown
Contributor

Now that the MSRV is high enough, might as well.

(inspired by #1106 (comment))

@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.93%. Comparing base (6814180) to head (d3a90eb).
⚠️ Report is 207 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1107      +/-   ##
==========================================
- Coverage   94.38%   93.93%   -0.46%     
==========================================
  Files          48       52       +4     
  Lines        6665     6679      +14     
==========================================
- Hits         6291     6274      -17     
- Misses        374      405      +31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/lib.rs
F: FnMut(B, Self::Item) -> FoldWhile<B>,
{
use Result::{Err as Break, Ok as Continue};
use core::ops::ControlFlow::{Break, Continue};
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea how this could change the code coverage...

@phimuemue phimuemue added this pull request to the merge queue May 26, 2026
Merged via the queue into rust-itertools:master with commit 86ec635 May 26, 2026
13 of 14 checks passed
@phimuemue
Copy link
Copy Markdown
Member

phimuemue commented May 26, 2026

@scottmcm thanks.

@jswrenn I hope I don't miss the forest for the trees, but imho we should deprecate (and later remove) Itertools::{fold_while, FoldWhile}.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants