Skip to content

Commit

Permalink
Update map.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
frehberg committed Sep 26, 2016
1 parent aed99c8 commit bd80e7b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/libstd/collections/hash/map.rs
Expand Up @@ -344,13 +344,10 @@ fn test_resize_policy() {
/// [ ("Norway", 100),
/// ("Denmark", 50),
/// ("Iceland", 10) ]
/// .iter().map(|&x| x).collect();
/// // use the values store in map
/// .iter().cloned().collect();
/// // use the values stored in map
/// }
/// ```
/// This works for Copy types, if you want to cover non-copy types then you need to replace
/// the map(|&x| x) with map(|x| x.clone())


#[derive(Clone)]
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down

0 comments on commit bd80e7b

Please sign in to comment.