Skip to content

Commit

Permalink
core: Fix example for .map()
Browse files Browse the repository at this point in the history
Make the example use DoubleEndedIterator for map, like it said it would.
  • Loading branch information
bluss committed Nov 23, 2016
1 parent 1c6048d commit 557369e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/iter/mod.rs
Expand Up @@ -920,7 +920,7 @@ unsafe impl<A, B> TrustedLen for Zip<A, B>
/// you can also [`map()`] backwards:
///
/// ```rust
/// let v: Vec<i32> = vec![1, 2, 3].into_iter().rev().map(|x| x + 1).collect();
/// let v: Vec<i32> = vec![1, 2, 3].into_iter().map(|x| x + 1).rev().collect();
///
/// assert_eq!(v, [4, 3, 2]);
/// ```
Expand Down

0 comments on commit 557369e

Please sign in to comment.