Skip to content

clippy: fix manual_option_zip lint#1098

Merged
phimuemue merged 1 commit intorust-itertools:masterfrom
xtqqczze:clippy/manual_option_zip
Apr 18, 2026
Merged

clippy: fix manual_option_zip lint#1098
phimuemue merged 1 commit intorust-itertools:masterfrom
xtqqczze:clippy/manual_option_zip

Conversation

@xtqqczze
Copy link
Copy Markdown
Contributor

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 15, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1098      +/-   ##
==========================================
- Coverage   94.38%   93.92%   -0.47%     
==========================================
  Files          48       51       +3     
  Lines        6665     6466     -199     
==========================================
- Hits         6291     6073     -218     
- Misses        374      393      +19     

☔ 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.

@phimuemue phimuemue force-pushed the clippy/manual_option_zip branch from 225ed02 to 759bbeb Compare April 17, 2026 10:31
@phimuemue
Copy link
Copy Markdown
Member

phimuemue commented Apr 17, 2026

Hi there, I think your transformation is correct, so thanks for this.

However, it relies on evaluation order, i.e. this:

it.next() // must be evaluated first
    .zip(
        it.next() // must be evaluated second
    )

From what I glean from https://doc.rust-lang.org/reference/expressions.html#evaluation-order-of-operands, one can rely on it, but I don't want to encourage to do it.

Can you maybe change it to it.next_array::<2>()?

@xtqqczze xtqqczze force-pushed the clippy/manual_option_zip branch from 759bbeb to db613dc Compare April 17, 2026 12:31
@xtqqczze
Copy link
Copy Markdown
Contributor Author

Can you maybe change it to it.next_array::<2>()?

Yeah, that looks better: db613dc

@phimuemue phimuemue added this pull request to the merge queue Apr 18, 2026
Merged via the queue into rust-itertools:master with commit d36b378 Apr 18, 2026
12 of 14 checks passed
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