about summary refs log tree commit diff
path: root/src/libcore/iter/mod.rs
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-425/+0
2020-07-17Remove code span for implLzu Tao-3/+3
Because the old one is harder to read and confuse typing checkers.
2020-07-17Link Some(item)Lzu Tao-2/+3
2020-07-17Remove unneeded link for OptionLzu Tao-1/+0
2020-02-16Improve documentation on iteratorsLeSeulArtichaut-1/+2
2020-02-04Stabilize `core::iter::once_with()`Yuki Okushi-1/+1
2020-01-28Fill tracking issue for `iter_map_while` featureWaffle-1/+1
2020-01-28Add `Iterator::map_while` method and corresponding `MapWhile` adapterWaffle-0/+2
2019-12-23docs: Iterator adapters have unspecified results after a panicMark Rousskov-0/+5
2019-12-22Format the worldMark Rousskov-30/+36
2019-10-30doc: reword iter module example and mention other methodsLzu Tao-21/+14
2019-07-29Use internal iteration in the Sum and Product impls of Result and OptionTim Vermeulen-1/+1
2019-07-27Refactoring use commun code between option, result and accumStargateur-1/+1
2019-05-27Updated the Iterator docs with information about overriding methods.Christian-0/+5
2019-04-27Stabilize Iterator::copied in 1.36.0.Mazdak Farrokhzad-1/+1
2019-04-18libcore => 2018Taiki Endo-1/+1
2019-03-18Replaced self-reflective explicit types with clearer `Self` or `Self::…` ↵Vincent Esche-1/+1
in stdlib docs
2019-02-19Stabilize iter::from_fnSimon Sapin-1/+1
FCP: https://github.com/rust-lang/rust/issues/55977#issuecomment-463964234
2019-02-19Stabilize iter::successorsSimon Sapin-1/+3
FCP: https://github.com/rust-lang/rust/issues/58045#issuecomment-464674773
2019-02-01Rename iter::unfold to iter::from_fn and remove explicit stateSimon Sapin-1/+1
This API is unstable. CC https://github.com/rust-lang/rust/issues/55977#issuecomment-459657195
2019-01-22Don't expose ZipImpl to IteratorClar Fon-1/+0
2019-01-22Don't expose FlattenCompat to IteratorClar Fon-1/+1
2019-01-22Don't expose ChainState to IteratorClar Fon-1/+1
2019-01-22Move TrustedRandomAccess into Zip moduleClar Fon-0/+1
2019-01-22Move core::iter iterator.rs to traits moduleClar Fon-2/+1
2019-01-22Move core::iter adapters to adapters.rsClar Fon-2769/+18
2019-01-15Rollup merge of #57579 - stjepang:once-with, r=SimonSapinMazdak Farrokhzad-0/+2
Add core::iter::once_with() Functions `iter::once()` and `iter::repeat()` construct iterators from values. The latter has the lazy variant `iter::repeat_with()`, but the former doesn't. This PR therefore adds `iter::once_with()`. Another way to think of `iter::once_with()` is that it's a function that converts `FnOnce() -> T` into `Iterator<Item = T>`. If this seems like a reasonable addition, I'll open a tracking issue and update the `#[feature(...)]` attributes.
2019-01-13Fix intradoc link and update issue numberStjepan Glavina-1/+1
2019-01-13Add core::iter::once_withStjepan Glavina-0/+2
2019-01-13Change #[must_use] message of Iterator in documentationTaiki Endo-1/+1
2019-01-13Change #[must_use] message of IteratorTaiki Endo-21/+21
2018-12-26Auto merge of #56534 - xfix:copied, r=@SimonSapinbors-0/+100
Add unstable Iterator::copied() Initially suggested at https://github.com/bluss/rust-itertools/pull/289, however the maintainers of itertools suggested this may be better of in a standard library. The intent of `copied` is to avoid accidentally cloning iterator elements after doing a code refactoring which causes a structure to be no longer `Copy`. This is a relatively common pattern, as it can be seen by calling `rg --pcre2 '[.]map[(][|](?:(\w+)[|] [*]\1|&(\w+)[|] \2)[)]'` on Rust main repository. Additionally, many uses of `cloned` actually want to simply `Copy`, and changing something to be no longer copyable may introduce unnoticeable performance penalty. Also, this makes sense because the standard library includes `[T].copy_from_slice` to pair with `[T].clone_from_slice`. This also adds `Option::copied`, because it makes sense to pair it with `Iterator::copied`. I don't think this feature is particularly important, but it makes sense to update `Option` along with `Iterator` for consistency.
2018-12-26Add a tracking issue for Iterator::copiedKonrad Borowski-6/+6
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-23Merge branch 'master' into copiedKonrad Borowski-23/+26
2018-12-20Add DoubleEndedIterator::nth_backClar Fon-0/+6
2018-12-17Remove `<Cycle as Iterator>::try_fold` overrideShotaro Yamada-13/+0
It was a incorrect optimization.
2018-12-09Don't call size_hint of underlying iterator needlesslyShotaro Yamada-2/+10
2018-12-09Resolve FIXME and cleanupShotaro Yamada-20/+7
2018-12-09Override Cycle::try_foldShotaro Yamada-0/+13
name old ns/iter new ns/iter diff ns/iter diff % speedup iter::bench_cycle_take_ref_sum 927,152 927,194 42 0.00% x 1.00 iter::bench_cycle_take_sum 938,129 603,492 -334,637 -35.67% x 1.55
2018-12-05Avoid calling clone in DoubleEndedIterator implementation of CopiedKonrad Borowski-2/+2
2018-12-05Use inner iterator may_have_side_effect for ClonedKonrad Borowski-1/+3
Previous implementation wasn't correct, as an inner iterator could have had side effects.
2018-12-05Copy may_have_side_effect from I for Copied<I>Konrad Borowski-1/+3
2018-12-05Use copied method instead of cloned in Copied::next_back()Konrad Borowski-1/+1
2018-12-05Add unstable Iterator::copied()Konrad Borowski-0/+98
2018-11-20CapitalizeSimon Sapin-2/+2
2018-11-20Add tracking issue for unfold and successorsSimon Sapin-1/+1
2018-11-20Add std::iter::successorsSimon Sapin-1/+1
2018-11-20Add std::iter::unfoldSimon Sapin-0/+2
2018-11-18revertАртём Павлов [Artyom Pavlov]-75/+7