Skip to content

Commit

Permalink
Fix some clippy warnings (apache#12346)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrobbel authored Sep 5, 2024
1 parent d6f3f73 commit f638df3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions datafusion/functions/benches/repeat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fn criterion_benchmark(c: &mut Criterion) {

let args = create_args::<i32>(size, 32, repeat_times, true);
group.bench_function(
&format!(
format!(
"repeat_string_view [size={}, repeat_times={}]",
size, repeat_times
),
Expand All @@ -76,7 +76,7 @@ fn criterion_benchmark(c: &mut Criterion) {

let args = create_args::<i32>(size, 32, repeat_times, false);
group.bench_function(
&format!(
format!(
"repeat_string [size={}, repeat_times={}]",
size, repeat_times
),
Expand All @@ -85,7 +85,7 @@ fn criterion_benchmark(c: &mut Criterion) {

let args = create_args::<i64>(size, 32, repeat_times, false);
group.bench_function(
&format!(
format!(
"repeat_large_string [size={}, repeat_times={}]",
size, repeat_times
),
Expand All @@ -103,7 +103,7 @@ fn criterion_benchmark(c: &mut Criterion) {

let args = create_args::<i32>(size, 32, repeat_times, true);
group.bench_function(
&format!(
format!(
"repeat_string_view [size={}, repeat_times={}]",
size, repeat_times
),
Expand All @@ -112,7 +112,7 @@ fn criterion_benchmark(c: &mut Criterion) {

let args = create_args::<i32>(size, 32, repeat_times, false);
group.bench_function(
&format!(
format!(
"repeat_string [size={}, repeat_times={}]",
size, repeat_times
),
Expand All @@ -121,7 +121,7 @@ fn criterion_benchmark(c: &mut Criterion) {

let args = create_args::<i64>(size, 32, repeat_times, false);
group.bench_function(
&format!(
format!(
"repeat_large_string [size={}, repeat_times={}]",
size, repeat_times
),
Expand Down
18 changes: 9 additions & 9 deletions datafusion/functions/benches/substr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,19 @@ fn criterion_benchmark(c: &mut Criterion) {

let args = create_args_without_count::<i32>(size, len, true, true);
group.bench_function(
&format!("substr_string_view [size={}, strlen={}]", size, len),
format!("substr_string_view [size={}, strlen={}]", size, len),
|b| b.iter(|| black_box(substr.invoke(&args))),
);

let args = create_args_without_count::<i32>(size, len, false, false);
group.bench_function(
&format!("substr_string [size={}, strlen={}]", size, len),
format!("substr_string [size={}, strlen={}]", size, len),
|b| b.iter(|| black_box(substr.invoke(&args))),
);

let args = create_args_without_count::<i64>(size, len, true, false);
group.bench_function(
&format!("substr_large_string [size={}, strlen={}]", size, len),
format!("substr_large_string [size={}, strlen={}]", size, len),
|b| b.iter(|| black_box(substr.invoke(&args))),
);

Expand All @@ -133,7 +133,7 @@ fn criterion_benchmark(c: &mut Criterion) {

let args = create_args_with_count::<i32>(size, len, count, true);
group.bench_function(
&format!(
format!(
"substr_string_view [size={}, count={}, strlen={}]",
size, count, len,
),
Expand All @@ -142,7 +142,7 @@ fn criterion_benchmark(c: &mut Criterion) {

let args = create_args_with_count::<i32>(size, len, count, false);
group.bench_function(
&format!(
format!(
"substr_string [size={}, count={}, strlen={}]",
size, count, len,
),
Expand All @@ -151,7 +151,7 @@ fn criterion_benchmark(c: &mut Criterion) {

let args = create_args_with_count::<i64>(size, len, count, false);
group.bench_function(
&format!(
format!(
"substr_large_string [size={}, count={}, strlen={}]",
size, count, len,
),
Expand All @@ -169,7 +169,7 @@ fn criterion_benchmark(c: &mut Criterion) {

let args = create_args_with_count::<i32>(size, len, count, true);
group.bench_function(
&format!(
format!(
"substr_string_view [size={}, count={}, strlen={}]",
size, count, len,
),
Expand All @@ -178,7 +178,7 @@ fn criterion_benchmark(c: &mut Criterion) {

let args = create_args_with_count::<i32>(size, len, count, false);
group.bench_function(
&format!(
format!(
"substr_string [size={}, count={}, strlen={}]",
size, count, len,
),
Expand All @@ -187,7 +187,7 @@ fn criterion_benchmark(c: &mut Criterion) {

let args = create_args_with_count::<i64>(size, len, count, false);
group.bench_function(
&format!(
format!(
"substr_large_string [size={}, count={}, strlen={}]",
size, count, len,
),
Expand Down

0 comments on commit f638df3

Please sign in to comment.