Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup more iterator usages (and other things) #69650

Merged
merged 5 commits into from
Mar 4, 2020

Conversation

matthiaskrgr
Copy link
Member

  • Improve weird formatting by moving comment inside else-code block.
  • Use .any(x) instead of .find(x).is_some() on iterators.
  • Use .nth(x) instead of .skip(x).next() on iterators.
  • Simplify conditions like x + 1 <= y to x < y
  • Use let instead of match to get value of enum with single variant.

@rust-highfive
Copy link
Collaborator

r? @varkor

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 3, 2020
@varkor
Copy link
Member

varkor commented Mar 3, 2020

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 3, 2020

📌 Commit 1018385 has been approved by varkor

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 3, 2020
bors added a commit that referenced this pull request Mar 3, 2020
Rollup of 6 pull requests

Successful merges:

 - #69565 (miri engine: turn some debug_assert into assert)
 - #69621 (use question mark operator in a few places.)
 - #69650 (cleanup more iterator usages (and other things))
 - #69653 (use conditions directly)
 - #69665 (Invoke OptimizerLastEPCallbacks in PreLinkThinLTO)
 - #69670 (Add explanation for E0379)

Failed merges:

r? @ghost
@bors bors merged commit 8ca3e59 into rust-lang:master Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants