diff --git a/src/libcollections/hashmap.rs b/src/libcollections/hashmap.rs index 44312e0eeaf..64a70c93b05 100644 --- a/src/libcollections/hashmap.rs +++ b/src/libcollections/hashmap.rs @@ -1275,15 +1275,14 @@ impl, V, S, H: Hasher> HashMap { /// use collections::HashMap; /// /// // map some strings to vectors of strings - /// let mut map = HashMap::>::new(); - /// map.insert(StrBuf::from_str("a key"), vec![StrBuf::from_str("value")]); - /// map.insert(StrBuf::from_str("z key"), vec![StrBuf::from_str("value")]); + /// let mut map = HashMap::new(); + /// map.insert("a key", vec!["value"]); + /// map.insert("z key", vec!["value"]); + /// + /// let new = vec!["a key", "b key", "z key"]; /// - /// let new = vec![StrBuf::from_str("a key"), - /// StrBuf::from_str("b key"), - /// StrBuf::from_str("z key")]; /// for k in new.move_iter() { - /// map.mangle(k, StrBuf::from_str("new value"), + /// map.mangle(k, "new value", /// // if the key doesn't exist in the map yet, add it in /// // the obvious way. /// |_k, v| vec![v], @@ -1299,7 +1298,7 @@ impl, V, S, H: Hasher> HashMap { /// } /// /// for (k, v) in map.iter() { - /// println!("{} -> {:?}", *k, *v); + /// println!("{} -> {}", *k, *v); /// } /// ``` pub fn mangle<'a, A>(&'a mut self,