@@ -501,11 +501,8 @@ impl<K, V> BTreeMap<K, V> {
501501 /// assert!(a.is_empty());
502502 /// ```
503503 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
504- pub fn clear ( & mut self )
505- where
506- K : Ord ,
507- {
508- * self = BTreeMap :: new ( ) ;
504+ pub fn clear ( & mut self ) {
505+ * self = BTreeMap { root : None , length : 0 } ;
509506 }
510507
511508 /// Returns a reference to the value corresponding to the key.
@@ -1226,10 +1223,7 @@ impl<K, V> BTreeMap<K, V> {
12261223 /// ```
12271224 #[ inline]
12281225 #[ unstable( feature = "map_into_keys_values" , issue = "75294" ) ]
1229- pub fn into_keys ( self ) -> IntoKeys < K , V >
1230- where
1231- K : Ord ,
1232- {
1226+ pub fn into_keys ( self ) -> IntoKeys < K , V > {
12331227 IntoKeys { inner : self . into_iter ( ) }
12341228 }
12351229
@@ -1252,10 +1246,7 @@ impl<K, V> BTreeMap<K, V> {
12521246 /// ```
12531247 #[ inline]
12541248 #[ unstable( feature = "map_into_keys_values" , issue = "75294" ) ]
1255- pub fn into_values ( self ) -> IntoValues < K , V >
1256- where
1257- K : Ord ,
1258- {
1249+ pub fn into_values ( self ) -> IntoValues < K , V > {
12591250 IntoValues { inner : self . into_iter ( ) }
12601251 }
12611252}
0 commit comments