@@ -5,7 +5,7 @@ use crate::future::Future;
55use crate :: stream:: Stream ;
66use crate :: task:: { Context , Poll } ;
77
8- /// A stream that repeats elements of type `T` endlessly by applying a provided clousre .
8+ /// A stream that repeats elements of type `T` endlessly by applying a provided closure .
99///
1010/// This stream is constructed by the [`repeat_with`] function.
1111///
@@ -31,14 +31,12 @@ pub struct RepeatWith<F, Fut, A> {
3131///
3232/// let s = stream::repeat_with(|| async { 1 });
3333///
34- ///
3534/// pin_utils::pin_mut!(s);
3635///
3736/// assert_eq!(s.next().await, Some(1));
3837/// assert_eq!(s.next().await, Some(1));
3938/// assert_eq!(s.next().await, Some(1));
4039/// assert_eq!(s.next().await, Some(1));
41- ///
4240/// # }) }
4341/// ```
4442///
@@ -52,13 +50,11 @@ pub struct RepeatWith<F, Fut, A> {
5250///
5351/// let s = stream::repeat_with(|| async { 1u8 }).take(2);
5452///
55- ///
5653/// pin_utils::pin_mut!(s);
5754///
5855/// assert_eq!(s.next().await, Some(1));
5956/// assert_eq!(s.next().await, Some(1));
6057/// assert_eq!(s.next().await, None);
61- ///
6258/// # }) }
6359/// ```
6460pub fn repeat_with < F , Fut , A > ( repeater : F ) -> RepeatWith < F , Fut , A > {
0 commit comments