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

Use .next() instead of .nth(0) on iterators. #69656

Merged
merged 1 commit into from
Mar 7, 2020

Conversation

matthiaskrgr
Copy link
Member

No description provided.

@rust-highfive
Copy link
Collaborator

r? @petrochenkov

(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
@petrochenkov
Copy link
Contributor

It seems slightly worse for readability but may be faster to compile and run.

Need a second opinion, reassigning to the first person from GitHub reviewer suggestions.
r? @oli-obk

@rust-highfive rust-highfive assigned oli-obk and unassigned petrochenkov Mar 3, 2020
@oli-obk
Copy link
Contributor

oli-obk commented Mar 3, 2020

Does this have a clippy lint? Or was this a manual thing?

@matthiaskrgr
Copy link
Member Author

@oli-obk
Copy link
Contributor

oli-obk commented Mar 3, 2020

@bors r+

Please post this info on future PRs

@bors
Copy link
Contributor

bors commented Mar 3, 2020

📌 Commit d3e5177 has been approved by oli-obk

@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
@matthiaskrgr
Copy link
Member Author

matthiaskrgr commented Mar 3, 2020

Eh, so far I've often given the branch the name of the lint :P

@oli-obk
Copy link
Contributor

oli-obk commented Mar 3, 2020

XD sure, I still think it'll be easier for someone who comes back to these via git blame will have it easier if the commit message contains a link or an explanation for the change

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Mar 4, 2020
Use .next() instead of .nth(0) on iterators.
Centril added a commit to Centril/rust that referenced this pull request Mar 6, 2020
Use .next() instead of .nth(0) on iterators.
bors added a commit that referenced this pull request Mar 6, 2020
Rollup of 6 pull requests

Successful merges:

 - #69656 (Use .next() instead of .nth(0) on iterators.)
 - #69674 (Rename DefKind::Method and TraitItemKind::Method )
 - #69676 (Pass correct place to `discriminant_switch_effect`)
 - #69706 (Use subslice patterns in slice methods)
 - #69714 (Make PlaceRef take just one lifetime)
 - #69727 (Avoid using `unwrap()` in suggestions)

Failed merges:

 - #69589 (ast: `Mac`/`Macro` -> `MacCall`)
 - #69680 (rustc_expand: Factor out `Annotatable::into_tokens` to a separate method)

r? @ghost
Centril added a commit to Centril/rust that referenced this pull request Mar 6, 2020
Use .next() instead of .nth(0) on iterators.
Centril added a commit to Centril/rust that referenced this pull request Mar 7, 2020
Use .next() instead of .nth(0) on iterators.
bors added a commit that referenced this pull request Mar 7, 2020
Rollup of 9 pull requests

Successful merges:

 - #67741 (When encountering an Item in a pat context, point at the item def)
 - #68985 (Parse & reject postfix operators after casts)
 - #69656 (Use .next() instead of .nth(0) on iterators.)
 - #69680 (rustc_expand: Factor out `Annotatable::into_tokens` to a separate method)
 - #69690 (test(pattern): add tests for combinations of pattern features)
 - #69706 (Use subslice patterns in slice methods)
 - #69727 (Avoid using `unwrap()` in suggestions)
 - #69754 (Update deprecation version to 1.42 for Error::description)
 - #69782 (Don't redundantly repeat field names (clippy::redundant_field_names))

Failed merges:

r? @ghost
@bors bors merged commit 5d1433b into rust-lang:master Mar 7, 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.

5 participants