chore: Remove no_btreemap_retain feature from build.rs

This commit is contained in:
Piotr Osiewicz 2023-09-03 21:25:33 +02:00 committed by Piotr Osiewicz
parent 0daacdd52e
commit d0c979aaf1
3 changed files with 0 additions and 8 deletions

View File

@ -33,12 +33,6 @@ fn main() {
if minor < 45 {
println!("cargo:rustc-cfg=no_btreemap_remove_entry");
}
// BTreeMap::retain
// https://blog.rust-lang.org/2021/06/17/Rust-1.53.0.html#stabilized-apis
if minor < 53 {
println!("cargo:rustc-cfg=no_btreemap_retain");
}
}
fn rustc_minor_version() -> Option<u32> {

View File

@ -276,7 +276,6 @@ impl Map<String, Value> {
///
/// In other words, remove all pairs `(k, v)` such that `f(&k, &mut v)`
/// returns `false`.
#[cfg(not(no_btreemap_retain))]
#[inline]
pub fn retain<F>(&mut self, f: F)
where

View File

@ -35,7 +35,6 @@ fn test_append() {
assert!(val.is_empty());
}
#[cfg(not(no_btreemap_retain))]
#[test]
fn test_retain() {
let mut v: Value = from_str(r#"{"b":null,"a":null,"c":null}"#).unwrap();