-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
array::try_map #79713
array::try_map #79713
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
Thanks for the PR. I haven't been involved in the decisions to add any of the relevant methods for evaluating this one, so I want to consult with the rest of the libs teams on this. Specifically, I think we need to develop more policy around these questions:
@rust-lang/libs |
A few off-the-cuff musings,
|
☔ The latest upstream changes (presumably #79451) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
Co-authored-by: lcnr <bastian_kauschke@hotmail.de>
The job Click to see the possible cause of the failure (guessed by this bot)
|
☔ The latest upstream changes (presumably #80566) made this pull request unmergeable. Please resolve the merge conflicts. |
Ping from triage - @ethanboxx @rustbot label: -S-waiting-on-review +S-waiting-on-author |
Triage: |
Make `array::{try_from_fn, try_map}` and `Iterator::try_find` generic over `Try` Fixes rust-lang#85115 This only updates unstable functions. `array::try_map` didn't actually exist before; this adds it under the still-open tracking issue rust-lang#79711 from the old PR rust-lang#79713. Tracking issue for the new trait: rust-lang#91285 This would also solve the return type question in for the proposed `Iterator::try_reduce` in rust-lang#87054
TI: #79711
pub fn try_map<F, R, E, U>(self, mut f: F) -> Result<[U; N], E> where F: FnMut(T) -> R, R: Try<Ok = U, Error = E> { ... }
Thanks to @lcnr for helping me on this PR.
Much of the code was copied from
array::map
.