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

Add Iterator::try_for_each #48157

Merged
merged 1 commit into from
Feb 24, 2018
Merged

Add Iterator::try_for_each #48157

merged 1 commit into from
Feb 24, 2018

Conversation

scottmcm
Copy link
Member

The fallible version of for_each aka the stateless version of try_fold. Inspired by @cuviper's comment in #45379 (comment) as a more direct and obvious solution than .map(f).collect::<Result<(), _>>().

Like for_each, no need for an r version thanks to overrides in Rev.

iterator_try_fold tracking issue: #45594

The fallible version of for_each and the stateless version of try_fold.
@rust-highfive
Copy link
Collaborator

r? @aidanhs

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

@pietroalbini pietroalbini added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 12, 2018
@Centril Centril added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Feb 13, 2018
@aidanhs
Copy link
Member

aidanhs commented Feb 13, 2018

r? @dtolnay
(I assume this will go straight to rfcbot)

@rust-highfive rust-highfive assigned dtolnay and unassigned aidanhs Feb 13, 2018
@dtolnay
Copy link
Member

dtolnay commented Feb 13, 2018

@rfcbot fcp merge

@rfcbot
Copy link

rfcbot commented Feb 13, 2018

Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged teams:

No concerns currently listed.

Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Feb 13, 2018
@dtolnay
Copy link
Member

dtolnay commented Feb 16, 2018

This is being added as unstable, so I am going to unilaterally accept and we can consider more closely as a team before stabilization. Thanks @scottmcm!

@rfcbot fcp cancel

@rfcbot
Copy link

rfcbot commented Feb 16, 2018

@dtolnay proposal cancelled.

@rfcbot rfcbot removed the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Feb 16, 2018
@dtolnay
Copy link
Member

dtolnay commented Feb 16, 2018

@bors r+

@bors
Copy link
Contributor

bors commented Feb 16, 2018

📌 Commit 0bb818c has been approved by dtolnay

@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 Feb 16, 2018
Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 19, 2018
Add Iterator::try_for_each

The fallible version of `for_each` aka the stateless version of `try_fold`.  Inspired by @cuviper's comment in rust-lang#45379 (comment) as a more direct and obvious solution than `.map(f).collect::<Result<(), _>>()`.

Like `for_each`, no need for an `r` version thanks to overrides in `Rev`.

`iterator_try_fold` tracking issue: rust-lang#45594
bors added a commit that referenced this pull request Feb 20, 2018
Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 23, 2018
Add Iterator::try_for_each

The fallible version of `for_each` aka the stateless version of `try_fold`.  Inspired by @cuviper's comment in rust-lang#45379 (comment) as a more direct and obvious solution than `.map(f).collect::<Result<(), _>>()`.

Like `for_each`, no need for an `r` version thanks to overrides in `Rev`.

`iterator_try_fold` tracking issue: rust-lang#45594
bors added a commit that referenced this pull request Feb 23, 2018
Rollup of 12 pull requests

- Successful merges: #47933, #48072, #48083, #48123, #48157, #48219, #48221, #48245, #48429, #48436, #48438, #48472
- Failed merges:
bors added a commit that referenced this pull request Feb 24, 2018
Rollup of 12 pull requests

- Successful merges: #47933, #48072, #48083, #48123, #48157, #48219, #48221, #48245, #48429, #48436, #48438, #48472
- Failed merges:
@bors bors merged commit 0bb818c into rust-lang:master Feb 24, 2018
@scottmcm scottmcm deleted the try-for-each branch February 24, 2018 10:33
@cuviper cuviper mentioned this pull request Apr 2, 2018
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. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants