From 89fd473da0eab8eb20b1c36a3e22678b57424337 Mon Sep 17 00:00:00 2001 From: Fedor Sakharov Date: Sun, 22 Sep 2019 09:51:54 +0300 Subject: [PATCH] fixes merge artifacts in stream docs --- src/stream/stream/mod.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/stream/stream/mod.rs b/src/stream/stream/mod.rs index f126455d..65992eb8 100644 --- a/src/stream/stream/mod.rs +++ b/src/stream/stream/mod.rs @@ -275,6 +275,7 @@ pub trait Stream { /// This combinator does no guarding against overflows. /// /// # Examples + /// /// ``` /// # fn main() { async_std::task::block_on(async { /// # @@ -291,6 +292,7 @@ pub trait Stream { /// /// # /// # }) } + /// ``` fn enumerate(self) -> Enumerate where Self: Sized, @@ -357,6 +359,7 @@ pub trait Stream { done: false, } } + /// Creates a stream that uses a predicate to determine if an element /// should be yeilded. /// @@ -364,7 +367,7 @@ pub trait Stream { /// /// Basic usage: /// - ///``` + /// ``` /// # fn main() { async_std::task::block_on(async { /// # /// use std::collections::VecDeque; @@ -378,6 +381,7 @@ pub trait Stream { /// assert_eq!(s.next().await, None); /// # /// # }) } + /// ``` fn filter

(self, predicate: P) -> Filter where Self: Sized, @@ -415,6 +419,7 @@ pub trait Stream { /// assert_eq!(end, None); /// # /// # }) } + /// ``` fn filter_map(self, f: F) -> FilterMap where Self: Sized, @@ -801,6 +806,11 @@ pub trait Stream { /// /// ## Examples /// + /// ``` + /// # fn main() { async_std::task::block_on(async { + /// # + /// use std::collections::VecDeque; + /// use async_std::stream::Stream; /// let s: VecDeque = vec![1, 2, 3].into_iter().collect(); /// let mut skipped = s.skip(2); ///