rust/src/libcore/iter
Manish Goregaokar 5fd8d18097
Rollup merge of #48157 - scottmcm:try-for-each, r=dtolnay
Add Iterator::try_for_each

The fallible version of `for_each` aka the stateless version of `try_fold`.  Inspired by @cuviper's comment in https://github.com/rust-lang/rust/pull/45379#issuecomment-338370020 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: https://github.com/rust-lang/rust/issues/45594
2018-02-23 10:24:49 -08:00
..
iterator.rs Rollup merge of #48157 - scottmcm:try-for-each, r=dtolnay 2018-02-23 10:24:49 -08:00
mod.rs Auto merge of #45404 - giannicic:defaultimpl2, r=nikomatsakis 2018-02-16 00:03:10 +00:00
range.rs Auto merge of #48057 - scottmcm:less-match-more-compare, r=dtolnay 2018-02-08 06:38:30 +00:00
sources.rs core::iter::repeat_with: fix spelling, s/not/note 2018-02-16 22:14:32 +01:00
traits.rs Add Range[Inclusive]::is_empty 2018-02-09 01:47:18 -08:00