about summary refs log tree commit diff
path: root/src/libcore/iter/adapters/chain.rs
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-267/+0
2020-04-21Don't fuse Chain in its second iteratorJosh Stone-10/+22
Only the "first" iterator is actually set `None` when exhausted, depending on whether you iterate forward or backward. This restores behavior similar to the former `ChainState`, where it would transition from `Both` to `Front`/`Back` and only continue from that side. However, if you mix directions, then this may still set both sides to `None`, totally fusing the iterator.
2020-04-07Avoid extra &mut in Chain::fold and try_foldJosh Stone-2/+2
2020-04-07Reduce callsites in Chain::last()Josh Stone-11/+10
2020-04-07Reduce callsites in Chain::count()Josh Stone-6/+9
2020-04-07Implement Chain with Option fusesJosh Stone-149/+106
The iterators are now "fused" with `Option` so we don't need separate state to track which part is already exhausted, and we may also get niche layout for `None`. We don't use the real `Fuse` adapter because its specialization for `FusedIterator` unconditionally descends into the iterator, and that could be expensive to keep revisiting stuff like nested chains. It also hurts compiler performance to add more iterator layers to `Chain`.
2019-12-22Format the worldMark Rousskov-40/+47
2019-11-01Fixed std::iter::Chain documentationOleg Nosov-1/+1
2019-08-18Fix bug in iter::Chain::size_hintTim Vermeulen-8/+14
2019-05-03Add custom nth_back for ChainAndrea Corradi-0/+23
2019-04-22Remove double trailing newlinesvarkor-1/+0
2019-04-18libcore => 2018Taiki Endo-2/+3
2019-01-22Don't expose ChainState to IteratorClar Fon-4/+9
2019-01-22Move Chain and ChainState to own moduleClar Fon-0/+255