@@ -501,11 +501,8 @@ impl<K, V> BTreeMap<K, V> {
501
501
/// assert!(a.is_empty());
502
502
/// ```
503
503
#[ 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 } ;
509
506
}
510
507
511
508
/// Returns a reference to the value corresponding to the key.
@@ -1226,10 +1223,7 @@ impl<K, V> BTreeMap<K, V> {
1226
1223
/// ```
1227
1224
#[ inline]
1228
1225
#[ 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 > {
1233
1227
IntoKeys { inner : self . into_iter ( ) }
1234
1228
}
1235
1229
@@ -1252,10 +1246,7 @@ impl<K, V> BTreeMap<K, V> {
1252
1246
/// ```
1253
1247
#[ inline]
1254
1248
#[ 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 > {
1259
1250
IntoValues { inner : self . into_iter ( ) }
1260
1251
}
1261
1252
}
0 commit comments