diff --git a/src/map.rs b/src/map.rs index a6bdb6a..5ab4a39 100644 --- a/src/map.rs +++ b/src/map.rs @@ -234,20 +234,7 @@ impl Map { } } - #[cfg(all(feature = "preserve_order", not(no_btreemap_retain)))] - /// Retains only the elements specified by the predicate. - /// - /// In other words, remove all pairs `(k, v)` such that `f(&k, &mut v)` returns `false`. - /// The elements are visited in ascending key order. - #[inline] - pub fn retain(&mut self, f: F) - where - F: FnMut(&String, &mut Value) -> bool, - { - self.map.retain(f); - } - - #[cfg(all(not(feature = "preserve_order"), not(no_btreemap_retain)))] + #[cfg(not(no_btreemap_retain))] /// Retains only the elements specified by the predicate. /// /// In other words, remove all pairs `(k, v)` such that `f(&k, &mut v)` returns `false`.