-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Tracking Issue for Iterator::try_reduce (feature iterator_try_reduce) #87053
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Add a `try_reduce` method to the Iterator trait Tracking issue: rust-lang#87053
Can we get this toward stabilization? It's been in nightly for about half a year now, and I can't find any issues related to it. |
I'd like this to be stabilised as well. |
Stabilization ReportImplementation History
API SummaryA summary of the API can be found in the std documentation. Experience ReportExample Usages
The method is being used as a fairly straightforward short-circuiting version of It has been part of nightly for over a year now, no related issues have been opened since. I think it should be safe to stabilize. |
Nominated for libs-api discussion of the stabilization request above. Two important discussion topics for you:
|
@scottmcm We discussed this in today's @rust-lang/libs-api meeting. We had the same concerns about |
Also, there was a lot of interest in having a generic solution to avoid proliferating |
Uh oh!
There was an error while loading. Please reload this page.
Feature gate:
#![feature(iterator_try_reduce)]
This is a tracking issue for adding a
try_reduce
method to theIterator
trait. There isfold
andtry_fold
but onlyreduce
. It's possible for users to usetry_fold
directly but it's also possible to usefold
directly instead ofreduce
. I reason that ifreduce
exists that a fallibletry_reduce
should also exist to encourage the safe handling of errors.I use the
Try
trait as suggested by @sinkuu here for a similar feature.Steps / History
try_reduce
method to the Iterator trait #87054Unresolved Questions
The text was updated successfully, but these errors were encountered: