@@ -173,7 +173,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
173
173
/// use std::collections::BTreeMap;
174
174
///
175
175
/// let mut a = BTreeMap::new();
176
- /// a.insert(1u , "a");
176
+ /// a.insert(1 , "a");
177
177
/// a.clear();
178
178
/// assert!(a.is_empty());
179
179
/// ```
@@ -203,7 +203,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
203
203
/// use std::collections::BTreeMap;
204
204
///
205
205
/// let mut map = BTreeMap::new();
206
- /// map.insert(1u , "a");
206
+ /// map.insert(1 , "a");
207
207
/// assert_eq!(map.get(&1), Some(&"a"));
208
208
/// assert_eq!(map.get(&2), None);
209
209
/// ```
@@ -235,7 +235,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
235
235
/// use std::collections::BTreeMap;
236
236
///
237
237
/// let mut map = BTreeMap::new();
238
- /// map.insert(1u , "a");
238
+ /// map.insert(1 , "a");
239
239
/// assert_eq!(map.contains_key(&1), true);
240
240
/// assert_eq!(map.contains_key(&2), false);
241
241
/// ```
@@ -255,7 +255,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
255
255
/// use std::collections::BTreeMap;
256
256
///
257
257
/// let mut map = BTreeMap::new();
258
- /// map.insert(1u , "a");
258
+ /// map.insert(1 , "a");
259
259
/// match map.get_mut(&1) {
260
260
/// Some(x) => *x = "b",
261
261
/// None => (),
@@ -317,7 +317,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
317
317
/// use std::collections::BTreeMap;
318
318
///
319
319
/// let mut map = BTreeMap::new();
320
- /// assert_eq!(map.insert(37u , "a"), None);
320
+ /// assert_eq!(map.insert(37 , "a"), None);
321
321
/// assert_eq!(map.is_empty(), false);
322
322
///
323
323
/// map.insert(37, "b");
@@ -429,7 +429,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
429
429
/// use std::collections::BTreeMap;
430
430
///
431
431
/// let mut map = BTreeMap::new();
432
- /// map.insert(1u , "a");
432
+ /// map.insert(1 , "a");
433
433
/// assert_eq!(map.remove(&1), Some("a"));
434
434
/// assert_eq!(map.remove(&1), None);
435
435
/// ```
@@ -1170,16 +1170,16 @@ impl<K, V> BTreeMap<K, V> {
1170
1170
/// use std::collections::BTreeMap;
1171
1171
///
1172
1172
/// let mut map = BTreeMap::new();
1173
- /// map.insert(1u , "a");
1174
- /// map.insert(2u , "b");
1175
- /// map.insert(3u , "c");
1173
+ /// map.insert(1 , "a");
1174
+ /// map.insert(2 , "b");
1175
+ /// map.insert(3 , "c");
1176
1176
///
1177
1177
/// for (key, value) in map.iter() {
1178
1178
/// println!("{}: {}", key, value);
1179
1179
/// }
1180
1180
///
1181
1181
/// let (first_key, first_value) = map.iter().next().unwrap();
1182
- /// assert_eq!((*first_key, *first_value), (1u , "a"));
1182
+ /// assert_eq!((*first_key, *first_value), (1 , "a"));
1183
1183
/// ```
1184
1184
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1185
1185
pub fn iter ( & self ) -> Iter < K , V > {
@@ -1203,9 +1203,9 @@ impl<K, V> BTreeMap<K, V> {
1203
1203
/// use std::collections::BTreeMap;
1204
1204
///
1205
1205
/// let mut map = BTreeMap::new();
1206
- /// map.insert("a", 1u );
1207
- /// map.insert("b", 2u );
1208
- /// map.insert("c", 3u );
1206
+ /// map.insert("a", 1 );
1207
+ /// map.insert("b", 2 );
1208
+ /// map.insert("c", 3 );
1209
1209
///
1210
1210
/// // add 10 to the value if the key isn't "a"
1211
1211
/// for (key, value) in map.iter_mut() {
@@ -1235,9 +1235,9 @@ impl<K, V> BTreeMap<K, V> {
1235
1235
/// use std::collections::BTreeMap;
1236
1236
///
1237
1237
/// let mut map = BTreeMap::new();
1238
- /// map.insert(1u , "a");
1239
- /// map.insert(2u , "b");
1240
- /// map.insert(3u , "c");
1238
+ /// map.insert(1 , "a");
1239
+ /// map.insert(2 , "b");
1240
+ /// map.insert(3 , "c");
1241
1241
///
1242
1242
/// for (key, value) in map.into_iter() {
1243
1243
/// println!("{}: {}", key, value);
@@ -1264,11 +1264,11 @@ impl<K, V> BTreeMap<K, V> {
1264
1264
/// use std::collections::BTreeMap;
1265
1265
///
1266
1266
/// let mut a = BTreeMap::new();
1267
- /// a.insert(1u , "a");
1268
- /// a.insert(2u , "b");
1267
+ /// a.insert(1 , "a");
1268
+ /// a.insert(2 , "b");
1269
1269
///
1270
1270
/// let keys: Vec<usize> = a.keys().cloned().collect();
1271
- /// assert_eq!(keys, vec![1u ,2,]);
1271
+ /// assert_eq!(keys, vec![1 ,2,]);
1272
1272
/// ```
1273
1273
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1274
1274
pub fn keys < ' a > ( & ' a self ) -> Keys < ' a , K , V > {
@@ -1286,8 +1286,8 @@ impl<K, V> BTreeMap<K, V> {
1286
1286
/// use std::collections::BTreeMap;
1287
1287
///
1288
1288
/// let mut a = BTreeMap::new();
1289
- /// a.insert(1u , "a");
1290
- /// a.insert(2u , "b");
1289
+ /// a.insert(1 , "a");
1290
+ /// a.insert(2 , "b");
1291
1291
///
1292
1292
/// let values: Vec<&str> = a.values().cloned().collect();
1293
1293
/// assert_eq!(values, vec!["a","b"]);
@@ -1309,7 +1309,7 @@ impl<K, V> BTreeMap<K, V> {
1309
1309
///
1310
1310
/// let mut a = BTreeMap::new();
1311
1311
/// assert_eq!(a.len(), 0);
1312
- /// a.insert(1u , "a");
1312
+ /// a.insert(1 , "a");
1313
1313
/// assert_eq!(a.len(), 1);
1314
1314
/// ```
1315
1315
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -1324,7 +1324,7 @@ impl<K, V> BTreeMap<K, V> {
1324
1324
///
1325
1325
/// let mut a = BTreeMap::new();
1326
1326
/// assert!(a.is_empty());
1327
- /// a.insert(1u , "a");
1327
+ /// a.insert(1 , "a");
1328
1328
/// assert!(!a.is_empty());
1329
1329
/// ```
1330
1330
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -1474,13 +1474,13 @@ impl<K: Ord, V> BTreeMap<K, V> {
1474
1474
/// use std::collections::Bound::{Included, Unbounded};
1475
1475
///
1476
1476
/// let mut map = BTreeMap::new();
1477
- /// map.insert(3u , "a");
1478
- /// map.insert(5u , "b");
1479
- /// map.insert(8u , "c");
1477
+ /// map.insert(3 , "a");
1478
+ /// map.insert(5 , "b");
1479
+ /// map.insert(8 , "c");
1480
1480
/// for (&key, &value) in map.range(Included(&4), Included(&8)) {
1481
1481
/// println!("{}: {}", key, value);
1482
1482
/// }
1483
- /// assert_eq!(Some((&5u , &"b")), map.range(Included(&4), Unbounded).next());
1483
+ /// assert_eq!(Some((&5 , &"b")), map.range(Included(&4), Unbounded).next());
1484
1484
/// ```
1485
1485
#[ unstable( feature = "collections" ,
1486
1486
reason = "matches collection reform specification, waiting for dust to settle" ) ]
@@ -1539,7 +1539,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
1539
1539
/// }
1540
1540
/// }
1541
1541
///
1542
- /// assert_eq!(count["a"], 3u );
1542
+ /// assert_eq!(count["a"], 3 );
1543
1543
/// ```
1544
1544
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1545
1545
pub fn entry ( & mut self , mut key : K ) -> Entry < K , V > {
0 commit comments