From aa76f107d39aa4ea8337601af0e0eb9d1735cfb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anselm=20Sch=C3=BCler?= Date: Fri, 18 Oct 2024 01:46:18 +0200 Subject: [PATCH] docs: fix std::iter::repeat_n MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit remove statement that std::iter::repeat_n(element, count) is different from std::iter::repeat(element).take(count) because its return type implements std::iter::ExactSizeIterator this would’ve been true if 994e712162af1d568a1751c32626478f2c613cc2 and 3dca90946f612f73b64f6c17ecb82a520a1d8da1 didn't add impl std::iter::ExactSizeIterator for std::iter::Take> --- library/core/src/iter/sources/repeat_n.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/core/src/iter/sources/repeat_n.rs b/library/core/src/iter/sources/repeat_n.rs index 7e162ff387baf..cc089c617c0e3 100644 --- a/library/core/src/iter/sources/repeat_n.rs +++ b/library/core/src/iter/sources/repeat_n.rs @@ -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 ///