summaryrefslogtreecommitdiffstats
path: root/library/alloc/benches/btree/map.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/alloc/benches/btree/map.rs')
-rw-r--r--library/alloc/benches/btree/map.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/library/alloc/benches/btree/map.rs b/library/alloc/benches/btree/map.rs
index ec1b0a8eb..7d2366477 100644
--- a/library/alloc/benches/btree/map.rs
+++ b/library/alloc/benches/btree/map.rs
@@ -385,7 +385,7 @@ pub fn clone_slim_100_and_clear(b: &mut Bencher) {
#[bench]
pub fn clone_slim_100_and_drain_all(b: &mut Bencher) {
let src = slim_map(100);
- b.iter(|| src.clone().drain_filter(|_, _| true).count())
+ b.iter(|| src.clone().extract_if(|_, _| true).count())
}
#[bench]
@@ -393,7 +393,7 @@ pub fn clone_slim_100_and_drain_half(b: &mut Bencher) {
let src = slim_map(100);
b.iter(|| {
let mut map = src.clone();
- assert_eq!(map.drain_filter(|i, _| i % 2 == 0).count(), 100 / 2);
+ assert_eq!(map.extract_if(|i, _| i % 2 == 0).count(), 100 / 2);
assert_eq!(map.len(), 100 / 2);
})
}
@@ -456,7 +456,7 @@ pub fn clone_slim_10k_and_clear(b: &mut Bencher) {
#[bench]
pub fn clone_slim_10k_and_drain_all(b: &mut Bencher) {
let src = slim_map(10_000);
- b.iter(|| src.clone().drain_filter(|_, _| true).count())
+ b.iter(|| src.clone().extract_if(|_, _| true).count())
}
#[bench]
@@ -464,7 +464,7 @@ pub fn clone_slim_10k_and_drain_half(b: &mut Bencher) {
let src = slim_map(10_000);
b.iter(|| {
let mut map = src.clone();
- assert_eq!(map.drain_filter(|i, _| i % 2 == 0).count(), 10_000 / 2);
+ assert_eq!(map.extract_if(|i, _| i % 2 == 0).count(), 10_000 / 2);
assert_eq!(map.len(), 10_000 / 2);
})
}
@@ -527,7 +527,7 @@ pub fn clone_fat_val_100_and_clear(b: &mut Bencher) {
#[bench]
pub fn clone_fat_val_100_and_drain_all(b: &mut Bencher) {
let src = fat_val_map(100);
- b.iter(|| src.clone().drain_filter(|_, _| true).count())
+ b.iter(|| src.clone().extract_if(|_, _| true).count())
}
#[bench]
@@ -535,7 +535,7 @@ pub fn clone_fat_val_100_and_drain_half(b: &mut Bencher) {
let src = fat_val_map(100);
b.iter(|| {
let mut map = src.clone();
- assert_eq!(map.drain_filter(|i, _| i % 2 == 0).count(), 100 / 2);
+ assert_eq!(map.extract_if(|i, _| i % 2 == 0).count(), 100 / 2);
assert_eq!(map.len(), 100 / 2);
})
}