aboutsummaryrefslogtreecommitdiff
path: root/src/tests/example_sets
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/example_sets')
-rw-r--r--src/tests/example_sets/benches/main.rs2
-rw-r--r--src/tests/example_sets/src/lib.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tests/example_sets/benches/main.rs b/src/tests/example_sets/benches/main.rs
index 7b46c8e..26e8547 100644
--- a/src/tests/example_sets/benches/main.rs
+++ b/src/tests/example_sets/benches/main.rs
@@ -1,7 +1,7 @@
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
fn run_benches(c: &mut Criterion) {
- for size in [500, 10_000, 50_000].iter() {
+ for size in [500, 2_000, 10_000, 50_000].iter() {
c.bench_with_input(
BenchmarkId::new("example_sets-insert_n", size),
size,
diff --git a/src/tests/example_sets/src/lib.rs b/src/tests/example_sets/src/lib.rs
index dff5a27..c5bd163 100644
--- a/src/tests/example_sets/src/lib.rs
+++ b/src/tests/example_sets/src/lib.rs
@@ -14,7 +14,7 @@ pub fn insert_n(n: usize) {
set.insert(random());
}
- for i in 0..2 * n {
- black_box(|x| x)(black_box(set.contains(&i)));
+ for _ in 0..2 * n {
+ black_box(|x| x)(black_box(set.contains(&random())));
}
}