pub fn chain<A: IntoIterator, B: IntoIterator<Item = A::Item>>(
a: A,
b: B,
) -> Chain<A::IntoIter, B::IntoIter> ⓘ
Expand description
Chain two iterators together. The result first iterates over a
, then b
, until both are
exhausted.
This addresses a quirk where deep iterators would not be optimized to their full potential.
Here, functions are marked with #[inline(always)]
to indicate that the compiler should
try hard to inline the iterators.