Skip to content

Commit 19b00c9

Browse files
committed
Simplify flat_map example
1 parent c3d60ab commit 19b00c9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/libcore/iter.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,10 +458,9 @@ pub trait Iterator {
458458
/// # Examples
459459
///
460460
/// ```
461-
/// # #![feature(core)]
462461
/// let xs = [2, 3];
463462
/// let ys = [0, 1, 0, 1, 2];
464-
/// let it = xs.iter().flat_map(|&x| (0..).take(x));
463+
/// let it = xs.iter().flat_map(|&x| 0..x);
465464
/// // Check that `it` has the same elements as `ys`
466465
/// for (i, x) in it.enumerate() {
467466
/// assert_eq!(x, ys[i]);

0 commit comments

Comments
 (0)