@@ -275,6 +275,7 @@ pub trait Stream {
275
275
/// This combinator does no guarding against overflows.
276
276
///
277
277
/// # Examples
278
+ ///
278
279
/// ```
279
280
/// # fn main() { async_std::task::block_on(async {
280
281
/// #
@@ -291,6 +292,7 @@ pub trait Stream {
291
292
///
292
293
/// #
293
294
/// # }) }
295
+ /// ```
294
296
fn enumerate ( self ) -> Enumerate < Self >
295
297
where
296
298
Self : Sized ,
@@ -357,14 +359,15 @@ pub trait Stream {
357
359
done : false ,
358
360
}
359
361
}
362
+
360
363
/// Creates a stream that uses a predicate to determine if an element
361
364
/// should be yeilded.
362
365
///
363
366
/// # Examples
364
367
///
365
368
/// Basic usage:
366
369
///
367
- ///```
370
+ /// ```
368
371
/// # fn main() { async_std::task::block_on(async {
369
372
/// #
370
373
/// use std::collections::VecDeque;
@@ -378,6 +381,7 @@ pub trait Stream {
378
381
/// assert_eq!(s.next().await, None);
379
382
/// #
380
383
/// # }) }
384
+ /// ```
381
385
fn filter < P > ( self , predicate : P ) -> Filter < Self , P , Self :: Item >
382
386
where
383
387
Self : Sized ,
@@ -415,6 +419,7 @@ pub trait Stream {
415
419
/// assert_eq!(end, None);
416
420
/// #
417
421
/// # }) }
422
+ /// ```
418
423
fn filter_map < B , F > ( self , f : F ) -> FilterMap < Self , F , Self :: Item , B >
419
424
where
420
425
Self : Sized ,
@@ -801,6 +806,11 @@ pub trait Stream {
801
806
///
802
807
/// ## Examples
803
808
///
809
+ /// ```
810
+ /// # fn main() { async_std::task::block_on(async {
811
+ /// #
812
+ /// use std::collections::VecDeque;
813
+ /// use async_std::stream::Stream;
804
814
/// let s: VecDeque<usize> = vec![1, 2, 3].into_iter().collect();
805
815
/// let mut skipped = s.skip(2);
806
816
///
0 commit comments