Change ResultShunt to be generic over Try#93572
Conversation
|
r? @yaahc (rust-highfive has picked a reviewer for you, use r? to override) |
|
@bors r+ |
|
📌 Commit 399893d has been approved by |
Change `ResultShunt` to be generic over `Try` Just a refactor (and rename) for now, so it's not `Result`-specific. This could be used for a future `Iterator::try_collect`, or similar, but anything like that is left for a future PR.
|
Failed in a rollup: #93702 (comment) |
|
Fixes for the 2021 stuff are now in #93719 -- I'll rebase this onto that later. |
Just a refactor (and rename) for now, so it's not `Result`-specific. This could be used for a future `Iterator::try_collect`, or similar, but anything like that is left for a future PR.
399893d to
413945e
Compare
|
@bors r=yaahc No new code changes; just rebased onto master now that my other PR landed. |
|
📌 Commit 413945e has been approved by |
|
@bors rollup=iffy (failed in rollup last time, so there might still be something I missed) |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (0c292c9): comparison url. Summary: This benchmark run did not return any relevant results. 6 results were found to be statistically significant but too small to be relevant. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Let `try_collect` take advantage of `try_fold` overrides No public API changes. With this change, `try_collect` (rust-lang#94047) is no longer going through the `impl Iterator for &mut impl Iterator`, and thus will be able to use `try_fold` overrides instead of being forced through `next` for every element. Here's the test added, to see that it fails before this PR (once a new enough nightly is out): https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=462f2896f2fed2c238ee63ca1a7e7c56 This might as well go to the same person as my last `try_process` PR (rust-lang#93572), so r? `@yaahc`
Let `try_collect` take advantage of `try_fold` overrides No public API changes. With this change, `try_collect` (rust-lang#94047) is no longer going through the `impl Iterator for &mut impl Iterator`, and thus will be able to use `try_fold` overrides instead of being forced through `next` for every element. Here's the test added, to see that it fails before this PR (once a new enough nightly is out): https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=462f2896f2fed2c238ee63ca1a7e7c56 This might as well go to the same person as my last `try_process` PR (rust-lang#93572), so r? ``@yaahc``
Just a refactor (and rename) for now, so it's not
Result-specific.This could be used for a future
Iterator::try_collect, or similar, but anything like that is left for a future PR.