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

Make spec_extend use for_each() #54761

Merged
merged 1 commit into from Oct 4, 2018

Conversation

Projects
None yet
5 participants
@Lucretiel
Contributor

Lucretiel commented Oct 2, 2018

for_each will use an iterator's own implementation of try_fold, which I understand to be generally preferable (because nested iterator adapter's will use each other's try_fold and be designed for the specific adaptation in a way that promotes performance and inlining.

@rust-highfive

This comment has been minimized.

Show comment
Hide comment
@rust-highfive

rust-highfive Oct 2, 2018

Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cramertj (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

Collaborator

rust-highfive commented Oct 2, 2018

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cramertj (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@cramertj

This comment has been minimized.

Show comment
Hide comment
@cramertj

cramertj Oct 2, 2018

Member

@bors r+ rollup

Thanks!

Member

cramertj commented Oct 2, 2018

@bors r+ rollup

Thanks!

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Oct 2, 2018

Contributor

📌 Commit ec59188 has been approved by cramertj

Contributor

bors commented Oct 2, 2018

📌 Commit ec59188 has been approved by cramertj

kennytm added a commit to kennytm/rust that referenced this pull request Oct 3, 2018

Rollup merge of rust-lang#54761 - Lucretiel:patch-1, r=cramertj
Make spec_extend use for_each()

`for_each` will use an iterator's own implementation of `try_fold`, which I understand to be generally preferable (because nested iterator adapter's will use each other's `try_fold` and be designed for the specific adaptation in a way that promotes performance and inlining.

bors added a commit that referenced this pull request Oct 3, 2018

Auto merge of #54790 - kennytm:rollup, r=kennytm
Rollup of 10 pull requests

Successful merges:

 - #53523 (Add doc for impl From for Std Error)
 - #54638 (Add checking for tool distribution in Tier 1)
 - #54698 ([NFC] `getopts` is used by `librustc` and `librustc_driver`, but isn't declared in their `Cargo.toml`.)
 - #54743 (Cleanup rustc/ty part 2)
 - #54761 (Make spec_extend use for_each())
 - #54764 (Run debuginfo tests against rust-enabled lldb, when possible)
 - #54769 (Fix typo in CONTRIBUTING.md)
 - #54773 (Update a FIXME in memory.rs)
 - #54784 (Update clippy)
 - #54788 (A handful of cleanups for rustc/mir)

Failed merges:

r? @ghost

pietroalbini added a commit to pietroalbini/rust that referenced this pull request Oct 3, 2018

Rollup merge of rust-lang#54761 - Lucretiel:patch-1, r=cramertj
Make spec_extend use for_each()

`for_each` will use an iterator's own implementation of `try_fold`, which I understand to be generally preferable (because nested iterator adapter's will use each other's `try_fold` and be designed for the specific adaptation in a way that promotes performance and inlining.

bors added a commit that referenced this pull request Oct 3, 2018

Auto merge of #54796 - pietroalbini:rollup, r=pietroalbini
Rollup of 10 pull requests

Successful merges:

 - #53523 (Add doc for impl From for Std Error)
 - #54624 (handle outlives predicates in trait evaluation)
 - #54734 (Fix range literals borrowing suggestions)
 - #54761 (Make spec_extend use for_each())
 - #54769 (Fix typo in CONTRIBUTING.md)
 - #54773 (Update a FIXME in memory.rs)
 - #54777 (abolish ICE when pretty-printing async block)
 - #54780 (Remove duplicate predicates in `explicit_predicates_of`)
 - #54788 (A handful of cleanups for rustc/mir)
 - #54789 (Introduce `TyKind::UnnormalizedProjection`)

Failed merges:

r? @ghost
@scottmcm

This comment has been minimized.

Show comment
Hide comment
@scottmcm

scottmcm Oct 4, 2018

Member

Nice; this should help for extends with Chains.

Member

scottmcm commented Oct 4, 2018

Nice; this should help for extends with Chains.

pietroalbini added a commit to pietroalbini/rust that referenced this pull request Oct 4, 2018

Rollup merge of rust-lang#54761 - Lucretiel:patch-1, r=cramertj
Make spec_extend use for_each()

`for_each` will use an iterator's own implementation of `try_fold`, which I understand to be generally preferable (because nested iterator adapter's will use each other's `try_fold` and be designed for the specific adaptation in a way that promotes performance and inlining.

bors added a commit that referenced this pull request Oct 4, 2018

Auto merge of #54809 - pietroalbini:rollup, r=pietroalbini
Rollup of 10 pull requests

Successful merges:

 - #53523 (Add doc for impl From for Std Error)
 - #54746 (simplify some unused lints code)
 - #54761 (Make spec_extend use for_each())
 - #54769 (Fix typo in CONTRIBUTING.md)
 - #54773 (Update a FIXME in memory.rs)
 - #54777 (abolish ICE when pretty-printing async block)
 - #54780 (Remove duplicate predicates in `explicit_predicates_of`)
 - #54788 (A handful of cleanups for rustc/mir)
 - #54789 (Introduce `TyKind::UnnormalizedProjection`)
 - #54795 (remove padding from multiline format string label)

Failed merges:

r? @ghost

@bors bors merged commit ec59188 into rust-lang:master Oct 4, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment