Skip to content

Commit

Permalink
Rollup merge of rust-lang#131858 - AnthonyMikh:AnthonyMikh/repeat_n-i…
Browse files Browse the repository at this point in the history
…s-not-that-special-anymore, r=jhpratt

Remove outdated documentation for `repeat_n`

After rust-lang#106943, which made `Take<Repeat<I>>` implement `ExactSizeIterator`, part of documentation about difference from `repeat(x).take(n)` is no longer valid.

````@rustbot```` labels: +A-docs, +A-iterators
  • Loading branch information
jieyouxu authored Oct 18, 2024
2 parents 759820e + cdacdae commit 64bf99b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions library/core/src/iter/sources/repeat_n.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ use crate::num::NonZero;
/// The `repeat_n()` function repeats a single value exactly `n` times.
///
/// 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 `repeat_n()` can return the original value, rather than always cloning.
///
/// [`repeat()`]: crate::iter::repeat
///
Expand Down

0 comments on commit 64bf99b

Please sign in to comment.