@@ -1275,15 +1275,14 @@ impl<K: TotalEq + Hash<S>, V, S, H: Hasher<S>> HashMap<K, V, H> {
1275
1275
/// use collections::HashMap;
1276
1276
///
1277
1277
/// // map some strings to vectors of strings
1278
- /// let mut map = HashMap::<StrBuf, Vec<StrBuf>>::new();
1279
- /// map.insert(StrBuf::from_str("a key"), vec![StrBuf::from_str("value")]);
1280
- /// map.insert(StrBuf::from_str("z key"), vec![StrBuf::from_str("value")]);
1278
+ /// let mut map = HashMap::new();
1279
+ /// map.insert("a key", vec!["value"]);
1280
+ /// map.insert("z key", vec!["value"]);
1281
+ ///
1282
+ /// let new = vec!["a key", "b key", "z key"];
1281
1283
///
1282
- /// let new = vec![StrBuf::from_str("a key"),
1283
- /// StrBuf::from_str("b key"),
1284
- /// StrBuf::from_str("z key")];
1285
1284
/// for k in new.move_iter() {
1286
- /// map.mangle(k, StrBuf::from_str( "new value") ,
1285
+ /// map.mangle(k, "new value",
1287
1286
/// // if the key doesn't exist in the map yet, add it in
1288
1287
/// // the obvious way.
1289
1288
/// |_k, v| vec![v],
@@ -1299,7 +1298,7 @@ impl<K: TotalEq + Hash<S>, V, S, H: Hasher<S>> HashMap<K, V, H> {
1299
1298
/// }
1300
1299
///
1301
1300
/// for (k, v) in map.iter() {
1302
- /// println!("{} -> {:? }", *k, *v);
1301
+ /// println!("{} -> {}", *k, *v);
1303
1302
/// }
1304
1303
/// ```
1305
1304
pub fn mangle < ' a , A > ( & ' a mut self ,
0 commit comments