Skip to content

Commit 557369e

Browse files
committed
core: Fix example for .map()
Make the example use DoubleEndedIterator for map, like it said it would.
1 parent 1c6048d commit 557369e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/iter/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ unsafe impl<A, B> TrustedLen for Zip<A, B>
920920
/// you can also [`map()`] backwards:
921921
///
922922
/// ```rust
923-
/// let v: Vec<i32> = vec![1, 2, 3].into_iter().rev().map(|x| x + 1).collect();
923+
/// let v: Vec<i32> = vec![1, 2, 3].into_iter().map(|x| x + 1).rev().collect();
924924
///
925925
/// assert_eq!(v, [4, 3, 2]);
926926
/// ```

0 commit comments

Comments
 (0)