@@ -270,7 +270,7 @@ pub struct Iter<'a, K: 'a, V: 'a> {
270
270
length : usize ,
271
271
}
272
272
273
- #[ stable( feature = "collection_debug" , since = "1.15 .0" ) ]
273
+ #[ stable( feature = "collection_debug" , since = "1.17 .0" ) ]
274
274
impl < ' a , K : ' a + fmt:: Debug , V : ' a + fmt:: Debug > fmt:: Debug for Iter < ' a , K , V > {
275
275
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
276
276
f. debug_list ( ) . entries ( self . clone ( ) ) . finish ( )
@@ -279,18 +279,12 @@ impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Iter<'a, K, V> {
279
279
280
280
/// A mutable iterator over a BTreeMap's entries.
281
281
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
282
+ #[ derive( Debug ) ]
282
283
pub struct IterMut < ' a , K : ' a , V : ' a > {
283
284
range : RangeMut < ' a , K , V > ,
284
285
length : usize ,
285
286
}
286
287
287
- #[ stable( feature = "collection_debug" , since = "1.15.0" ) ]
288
- impl < ' a , K : ' a + fmt:: Debug , V : ' a + fmt:: Debug > fmt:: Debug for IterMut < ' a , K , V > {
289
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
290
- f. pad ( & format ! ( "BTreeMap::IterMut({:?})" , self . range) )
291
- }
292
- }
293
-
294
288
/// An owning iterator over a BTreeMap's entries.
295
289
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
296
290
pub struct IntoIter < K , V > {
@@ -299,7 +293,7 @@ pub struct IntoIter<K, V> {
299
293
length : usize ,
300
294
}
301
295
302
- #[ stable( feature = "collection_debug" , since = "1.15 .0" ) ]
296
+ #[ stable( feature = "collection_debug" , since = "1.17 .0" ) ]
303
297
impl < K : fmt:: Debug , V : fmt:: Debug > fmt:: Debug for IntoIter < K , V > {
304
298
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
305
299
let range = Range {
@@ -316,7 +310,7 @@ pub struct Keys<'a, K: 'a, V: 'a> {
316
310
inner : Iter < ' a , K , V > ,
317
311
}
318
312
319
- #[ stable( feature = "collection_debug" , since = "1.15 .0" ) ]
313
+ #[ stable( feature = "collection_debug" , since = "1.17 .0" ) ]
320
314
impl < ' a , K : ' a + fmt:: Debug , V : ' a + fmt:: Debug > fmt:: Debug for Keys < ' a , K , V > {
321
315
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
322
316
f. debug_list ( ) . entries ( self . inner . clone ( ) ) . finish ( )
@@ -329,7 +323,7 @@ pub struct Values<'a, K: 'a, V: 'a> {
329
323
inner : Iter < ' a , K , V > ,
330
324
}
331
325
332
- #[ stable( feature = "collection_debug" , since = "1.15 .0" ) ]
326
+ #[ stable( feature = "collection_debug" , since = "1.17 .0" ) ]
333
327
impl < ' a , K : ' a + fmt:: Debug , V : ' a + fmt:: Debug > fmt:: Debug for Values < ' a , K , V > {
334
328
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
335
329
f. debug_list ( ) . entries ( self . inner . clone ( ) ) . finish ( )
@@ -338,24 +332,18 @@ impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Values<'a, K, V>
338
332
339
333
/// A mutable iterator over a BTreeMap's values.
340
334
#[ stable( feature = "map_values_mut" , since = "1.10.0" ) ]
335
+ #[ derive( Debug ) ]
341
336
pub struct ValuesMut < ' a , K : ' a , V : ' a > {
342
337
inner : IterMut < ' a , K , V > ,
343
338
}
344
339
345
- #[ stable( feature = "collection_debug" , since = "1.15.0" ) ]
346
- impl < ' a , K : ' a + fmt:: Debug , V : ' a + fmt:: Debug > fmt:: Debug for ValuesMut < ' a , K , V > {
347
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
348
- f. pad ( & format ! ( "BTreeMap::ValuesMut({:?})" , self . inner) )
349
- }
350
- }
351
-
352
340
/// An iterator over a sub-range of BTreeMap's entries.
353
341
pub struct Range < ' a , K : ' a , V : ' a > {
354
342
front : Handle < NodeRef < marker:: Immut < ' a > , K , V , marker:: Leaf > , marker:: Edge > ,
355
343
back : Handle < NodeRef < marker:: Immut < ' a > , K , V , marker:: Leaf > , marker:: Edge > ,
356
344
}
357
345
358
- #[ stable( feature = "collection_debug" , since = "1.15 .0" ) ]
346
+ #[ stable( feature = "collection_debug" , since = "1.17 .0" ) ]
359
347
impl < ' a , K : ' a + fmt:: Debug , V : ' a + fmt:: Debug > fmt:: Debug for Range < ' a , K , V > {
360
348
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
361
349
f. debug_list ( ) . entries ( self . clone ( ) ) . finish ( )
@@ -371,7 +359,7 @@ pub struct RangeMut<'a, K: 'a, V: 'a> {
371
359
_marker : PhantomData < & ' a mut ( K , V ) > ,
372
360
}
373
361
374
- #[ stable( feature = "collection_debug" , since = "1.15 .0" ) ]
362
+ #[ stable( feature = "collection_debug" , since = "1.17 .0" ) ]
375
363
impl < ' a , K : ' a + fmt:: Debug , V : ' a + fmt:: Debug > fmt:: Debug for RangeMut < ' a , K , V > {
376
364
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
377
365
let range = Range {
0 commit comments