Skip to content

Commit debd7d0

Browse files
author
Dean Karn
committed
remove duplicate function
1 parent 68d3b45 commit debd7d0

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/map.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -234,20 +234,7 @@ impl Map<String, Value> {
234234
}
235235
}
236236

237-
#[cfg(all(feature = "preserve_order", not(no_btreemap_retain)))]
238-
/// Retains only the elements specified by the predicate.
239-
///
240-
/// In other words, remove all pairs `(k, v)` such that `f(&k, &mut v)` returns `false`.
241-
/// The elements are visited in ascending key order.
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-
#[cfg(all(not(feature = "preserve_order"), not(no_btreemap_retain)))]
237+
#[cfg(not(no_btreemap_retain))]
251238
/// Retains only the elements specified by the predicate.
252239
///
253240
/// In other words, remove all pairs `(k, v)` such that `f(&k, &mut v)` returns `false`.

0 commit comments

Comments
 (0)