about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorFrank Rehberger <frehberg@gmail.com>2016-09-26 16:00:24 +0200
committerGitHub <noreply@github.com>2016-09-26 16:00:24 +0200
commitbd80e7bce77aae5a7d515a1113ae3a471d4ce6e2 (patch)
tree997660c1b9ec4ef3b42379310eb827a8b6820c93 /src/libstd
parentaed99c800e03bcda172ee3b5505ebcab8c5060e9 (diff)
downloadrust-bd80e7bce77aae5a7d515a1113ae3a471d4ce6e2.tar.gz
rust-bd80e7bce77aae5a7d515a1113ae3a471d4ce6e2.zip
Update map.rs
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/hash/map.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index 698ce8815bd..776643b7866 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -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")]