@@ -141,7 +141,7 @@ pub struct BTreeMap<K, V> {
141141unsafe impl < #[ may_dangle] K , #[ may_dangle] V > Drop for BTreeMap < K , V > {
142142 fn drop ( & mut self ) {
143143 unsafe {
144- for _ in ptr:: read ( self ) . into_iter ( ) {
144+ for _ in ptr:: read ( self ) {
145145 }
146146 }
147147 }
@@ -263,7 +263,7 @@ impl<K, Q: ?Sized> super::Recover<Q> for BTreeMap<K, ()>
263263 }
264264}
265265
266- /// An iterator over a BTreeMap's entries.
266+ /// An iterator over a ` BTreeMap` 's entries.
267267#[ stable( feature = "rust1" , since = "1.0.0" ) ]
268268pub struct Iter < ' a , K : ' a , V : ' a > {
269269 range : Range < ' a , K , V > ,
@@ -277,15 +277,15 @@ impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Iter<'a, K, V> {
277277 }
278278}
279279
280- /// A mutable iterator over a BTreeMap's entries.
280+ /// A mutable iterator over a ` BTreeMap` 's entries.
281281#[ stable( feature = "rust1" , since = "1.0.0" ) ]
282282#[ derive( Debug ) ]
283283pub struct IterMut < ' a , K : ' a , V : ' a > {
284284 range : RangeMut < ' a , K , V > ,
285285 length : usize ,
286286}
287287
288- /// An owning iterator over a BTreeMap's entries.
288+ /// An owning iterator over a ` BTreeMap` 's entries.
289289#[ stable( feature = "rust1" , since = "1.0.0" ) ]
290290pub struct IntoIter < K , V > {
291291 front : Handle < NodeRef < marker:: Owned , K , V , marker:: Leaf > , marker:: Edge > ,
@@ -304,7 +304,7 @@ impl<K: fmt::Debug, V: fmt::Debug> fmt::Debug for IntoIter<K, V> {
304304 }
305305}
306306
307- /// An iterator over a BTreeMap's keys.
307+ /// An iterator over a ` BTreeMap` 's keys.
308308#[ stable( feature = "rust1" , since = "1.0.0" ) ]
309309pub struct Keys < ' a , K : ' a , V : ' a > {
310310 inner : Iter < ' a , K , V > ,
@@ -317,7 +317,7 @@ impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Keys<'a, K, V> {
317317 }
318318}
319319
320- /// An iterator over a BTreeMap's values.
320+ /// An iterator over a ` BTreeMap` 's values.
321321#[ stable( feature = "rust1" , since = "1.0.0" ) ]
322322pub struct Values < ' a , K : ' a , V : ' a > {
323323 inner : Iter < ' a , K , V > ,
@@ -330,14 +330,14 @@ impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Values<'a, K, V>
330330 }
331331}
332332
333- /// A mutable iterator over a BTreeMap's values.
333+ /// A mutable iterator over a ` BTreeMap` 's values.
334334#[ stable( feature = "map_values_mut" , since = "1.10.0" ) ]
335335#[ derive( Debug ) ]
336336pub struct ValuesMut < ' a , K : ' a , V : ' a > {
337337 inner : IterMut < ' a , K , V > ,
338338}
339339
340- /// An iterator over a sub-range of BTreeMap's entries.
340+ /// An iterator over a sub-range of ` BTreeMap` 's entries.
341341pub struct Range < ' a , K : ' a , V : ' a > {
342342 front : Handle < NodeRef < marker:: Immut < ' a > , K , V , marker:: Leaf > , marker:: Edge > ,
343343 back : Handle < NodeRef < marker:: Immut < ' a > , K , V , marker:: Leaf > , marker:: Edge > ,
@@ -350,7 +350,7 @@ impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Range<'a, K, V>
350350 }
351351}
352352
353- /// A mutable iterator over a sub-range of BTreeMap's entries.
353+ /// A mutable iterator over a sub-range of ` BTreeMap` 's entries.
354354pub struct RangeMut < ' a , K : ' a , V : ' a > {
355355 front : Handle < NodeRef < marker:: Mut < ' a > , K , V , marker:: Leaf > , marker:: Edge > ,
356356 back : Handle < NodeRef < marker:: Mut < ' a > , K , V , marker:: Leaf > , marker:: Edge > ,
@@ -684,12 +684,12 @@ impl<K: Ord, V> BTreeMap<K, V> {
684684 #[ stable( feature = "btree_append" , since = "1.11.0" ) ]
685685 pub fn append ( & mut self , other : & mut Self ) {
686686 // Do we have to append anything at all?
687- if other. len ( ) == 0 {
687+ if other. is_empty ( ) {
688688 return ;
689689 }
690690
691691 // We can just swap `self` and `other` if `self` is empty.
692- if self . len ( ) == 0 {
692+ if self . is_empty ( ) {
693693 mem:: swap ( self , other) ;
694694 return ;
695695 }
@@ -1901,7 +1901,7 @@ impl<K, V> BTreeMap<K, V> {
19011901 /// assert_eq!(keys, [1, 2]);
19021902 /// ```
19031903 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
1904- pub fn keys < ' a > ( & ' a self ) -> Keys < ' a , K , V > {
1904+ pub fn keys ( & self ) -> Keys < K , V > {
19051905 Keys { inner : self . iter ( ) }
19061906 }
19071907
@@ -1922,7 +1922,7 @@ impl<K, V> BTreeMap<K, V> {
19221922 /// assert_eq!(values, ["hello", "goodbye"]);
19231923 /// ```
19241924 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
1925- pub fn values < ' a > ( & ' a self ) -> Values < ' a , K , V > {
1925+ pub fn values ( & self ) -> Values < K , V > {
19261926 Values { inner : self . iter ( ) }
19271927 }
19281928
@@ -2361,8 +2361,8 @@ enum UnderflowResult<'a, K, V> {
23612361 Stole ( NodeRef < marker:: Mut < ' a > , K , V , marker:: Internal > ) ,
23622362}
23632363
2364- fn handle_underfull_node < ' a , K , V > ( node : NodeRef < marker:: Mut < ' a > , K , V , marker:: LeafOrInternal > )
2365- -> UnderflowResult < ' a , K , V > {
2364+ fn handle_underfull_node < K , V > ( node : NodeRef < marker:: Mut , K , V , marker:: LeafOrInternal > )
2365+ -> UnderflowResult < K , V > {
23662366 let parent = if let Ok ( parent) = node. ascend ( ) {
23672367 parent
23682368 } else {
0 commit comments