From 473762205252ce1908ea542a1a29d2f10b8ed866 Mon Sep 17 00:00:00 2001 From: tyranron Date: Sun, 18 Dec 2022 18:40:15 +0100 Subject: [PATCH] Fix benches linting --- benches/benches/benchmark.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/benches/benches/benchmark.rs b/benches/benches/benchmark.rs index b6f82773..3f4a983a 100644 --- a/benches/benches/benchmark.rs +++ b/benches/benches/benchmark.rs @@ -31,9 +31,7 @@ fn bench_sync_vs_async_users_flat_instant(c: &mut Criterion) { let mut group = c.benchmark_group("Sync vs Async - Users Flat - Instant"); for count in [1, 10] { group.bench_function(BenchmarkId::new("Sync", count), |b| { - let ids = (0..count) - .map(|x| InputValue::scalar(x as i32)) - .collect::>(); + let ids = (0..count).map(InputValue::scalar).collect::>(); let ids = InputValue::list(ids); b.iter(|| { j::execute_sync( @@ -48,9 +46,7 @@ fn bench_sync_vs_async_users_flat_instant(c: &mut Criterion) { .build() .unwrap(); - let ids = (0..count) - .map(|x| InputValue::scalar(x as i32)) - .collect::>(); + let ids = (0..count).map(InputValue::scalar).collect::>(); let ids = InputValue::list(ids); b.iter(|| { @@ -65,9 +61,7 @@ fn bench_sync_vs_async_users_flat_instant(c: &mut Criterion) { group.bench_function(BenchmarkId::new("Async - Threadpool", count), |b| { let rt = tokio::runtime::Builder::new_multi_thread().build().unwrap(); - let ids = (0..count) - .map(|x| InputValue::scalar(x as i32)) - .collect::>(); + let ids = (0..count).map(InputValue::scalar).collect::>(); let ids = InputValue::list(ids); b.iter(|| {