about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorJon Gjengset <jon@thesquareplanet.com>2017-09-05 13:37:36 -0400
committerJon Gjengset <jon@thesquareplanet.com>2017-09-05 13:37:36 -0400
commit00bdae02fdbb2e27e4d27a54683537faa33b3f17 (patch)
tree1166791c5cdd6cf9abbe9a624d96f926eced84dc /src/libstd
parent35c7943fd2d2a65b63712d95d62c8837633218b4 (diff)
downloadrust-00bdae02fdbb2e27e4d27a54683537faa33b3f17.tar.gz
rust-00bdae02fdbb2e27e4d27a54683537faa33b3f17.zip
Avoid weird or_insert_with example
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/hash/map.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index 36399067a12..fbb69ca9749 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -2013,9 +2013,7 @@ impl<'a, K, V: Default> Entry<'a, K, V> {
     /// # fn main() {
     /// use std::collections::HashMap;
     ///
-    /// let mut map: HashMap<&str, Option<usize>> = HashMap::new();
-    /// let s = "hoho".to_string();
-    ///
+    /// let mut map: HashMap<&str, Option<u32>> = HashMap::new();
     /// map.entry("poneyland").or_default();
     ///
     /// assert_eq!(map["poneyland"], None);