Closed
Description
Location
https://doc.rust-lang.org/nightly/std/iter/fn.repeat_n.html
Summary
The newly stabalised std::iter::repeat_n
states:
This is very similar to using repeat() with Iterator::take(), but there are two differences:
- repeat_n() can return the original value, rather than always cloning.
- repeat_n() produces an ExactSizeIterator.
But the second item is no longer true, since impl ExactSizeIterator for Take<Repeat<T>>
and impl ExactSizeIterator for Take<RepeatWith<F>>
now exist and are stable.