File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -234,19 +234,6 @@ impl Map<String, Value> {
234
234
}
235
235
}
236
236
237
- /// Retains only the elements specified by the predicate.
238
- ///
239
- /// In other words, remove all pairs `(k, v)` such that `f(&k, &mut v)`
240
- /// returns `false`.
241
- #[ cfg( not( no_btreemap_retain) ) ]
242
- #[ inline]
243
- pub fn retain < F > ( & mut self , f : F )
244
- where
245
- F : FnMut ( & String , & mut Value ) -> bool ,
246
- {
247
- self . map . retain ( f) ;
248
- }
249
-
250
237
/// Gets an iterator over the values of the map.
251
238
#[ inline]
252
239
pub fn values ( & self ) -> Values {
@@ -262,6 +249,19 @@ impl Map<String, Value> {
262
249
iter : self . map . values_mut ( ) ,
263
250
}
264
251
}
252
+
253
+ /// Retains only the elements specified by the predicate.
254
+ ///
255
+ /// In other words, remove all pairs `(k, v)` such that `f(&k, &mut v)`
256
+ /// returns `false`.
257
+ #[ cfg( not( no_btreemap_retain) ) ]
258
+ #[ inline]
259
+ pub fn retain < F > ( & mut self , f : F )
260
+ where
261
+ F : FnMut ( & String , & mut Value ) -> bool ,
262
+ {
263
+ self . map . retain ( f) ;
264
+ }
265
265
}
266
266
267
267
#[ allow( clippy:: derivable_impls) ] // clippy bug: https://github.com/rust-lang/rust-clippy/issues/7655
You can’t perform that action at this time.
0 commit comments