Skip to content
/ rust Public
forked from rust-lang/rust

Commit 6c9bbaf

Browse files
authored
Rollup merge of rust-lang#131858 - AnthonyMikh:AnthonyMikh/repeat_n-is-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
2 parents dcfae0a + cdacdae commit 6c9bbaf

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

library/core/src/iter/sources/repeat_n.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ use crate::num::NonZero;
88
/// The `repeat_n()` function repeats a single value exactly `n` times.
99
///
1010
/// This is very similar to using [`repeat()`] with [`Iterator::take()`],
11-
/// but there are two differences:
12-
/// - `repeat_n()` can return the original value, rather than always cloning.
13-
/// - `repeat_n()` produces an [`ExactSizeIterator`].
11+
/// but `repeat_n()` can return the original value, rather than always cloning.
1412
///
1513
/// [`repeat()`]: crate::iter::repeat
1614
///

0 commit comments

Comments
 (0)