Tracking Issue for Iterator::try_reduce (feature iterator_try_reduce) · Issue #87053 · rust-lang/rust (original) (raw)
Feature gate: #![feature(iterator_try_reduce)]
This is a tracking issue for adding a try_reduce
method to the Iterator
trait. There is fold
and try_fold
but only reduce
. It's possible for users to use try_fold
directly but it's also possible to use fold
directly instead of reduce
. I reason that if reduce
exists that a fallible try_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
- Implementation: Add a try_reduce method to the Iterator trait #87054
- Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- None yet.