Skip to content

Commit eaa1a31

Browse files
author
Dean Karn
committed
fix no_btreemap_retain name
1 parent 09c5892 commit eaa1a31

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/map.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,25 +234,25 @@ impl Map<String, Value> {
234234
}
235235
}
236236

237+
#[cfg(all(feature = "preserve_order", not(no_btreemap_retain)))]
237238
/// Retains only the elements specified by the predicate.
238239
///
239240
/// In other words, remove all pairs `(k, v)` such that `f(&k, &mut v)` returns `false`.
240241
/// The elements are visited in ascending key order.
241242
#[inline]
242-
#[cfg(all(feature = "preserve_order", not(no_btreemap_remove_entry)))]
243243
pub fn retain<F, K>(&mut self, f: F)
244244
where
245245
F: FnMut(&String, &mut Value) -> bool,
246246
{
247247
self.map.retain(f);
248248
}
249249

250+
#[cfg(not(feature = "preserve_order"))]
250251
/// Retains only the elements specified by the predicate.
251252
///
252253
/// In other words, remove all pairs `(k, v)` such that `f(&k, &mut v)` returns `false`.
253254
/// The elements are visited in ascending key order.
254255
#[inline]
255-
#[cfg(not(feature = "preserve_order"))]
256256
pub fn retain<F>(&mut self, f: F)
257257
where
258258
F: FnMut(&String, &mut Value) -> bool,

0 commit comments

Comments
 (0)