From 2384df11ed27e186ae7cab6db7938165db58898f Mon Sep 17 00:00:00 2001 From: Fedor Sakharov Date: Sun, 6 Oct 2019 08:27:44 +0300 Subject: [PATCH] Apply suggestions from code review Co-Authored-By: Yoshua Wuyts --- src/stream/repeat_with.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/stream/repeat_with.rs b/src/stream/repeat_with.rs index b682dfa8..ce249ddb 100644 --- a/src/stream/repeat_with.rs +++ b/src/stream/repeat_with.rs @@ -5,7 +5,7 @@ use crate::future::Future; use crate::stream::Stream; use crate::task::{Context, Poll}; -/// A stream that repeats elements of type `T` endlessly by applying a provided clousre. +/// A stream that repeats elements of type `T` endlessly by applying a provided closure. /// /// This stream is constructed by the [`repeat_with`] function. /// @@ -31,14 +31,12 @@ pub struct RepeatWith { /// /// let s = stream::repeat_with(|| async { 1 }); /// -/// /// pin_utils::pin_mut!(s); /// /// assert_eq!(s.next().await, Some(1)); /// assert_eq!(s.next().await, Some(1)); /// assert_eq!(s.next().await, Some(1)); /// assert_eq!(s.next().await, Some(1)); -/// /// # }) } /// ``` /// @@ -52,13 +50,11 @@ pub struct RepeatWith { /// /// let s = stream::repeat_with(|| async { 1u8 }).take(2); /// -/// /// pin_utils::pin_mut!(s); /// /// assert_eq!(s.next().await, Some(1)); /// assert_eq!(s.next().await, Some(1)); /// assert_eq!(s.next().await, None); -/// /// # }) } /// ``` pub fn repeat_with(repeater: F) -> RepeatWith {