Skip to content

Commit 2384df1

Browse files
Apply suggestions from code review
Co-Authored-By: Yoshua Wuyts <yoshuawuyts+github@gmail.com>
1 parent 735d604 commit 2384df1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/stream/repeat_with.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::future::Future;
55
use crate::stream::Stream;
66
use 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
/// ```
6460
pub fn repeat_with<F, Fut, A>(repeater: F) -> RepeatWith<F, Fut, A> {

0 commit comments

Comments
 (0)