Skip to content

Apache DataFusion SQL Query Engine

Fix some clippy warnings (#12346)

Matthijs Brobbelf638df3e4173
diff --git a/datafusion/functions/benches/repeat.rs b/datafusion/functions/benches/repeat.rs
index 916c8374e5..e45313660e 100644
--- a/datafusion/functions/benches/repeat.rs
+++ b/datafusion/functions/benches/repeat.rs
@@ -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
),
@@ -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
),
@@ -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
),
@@ -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
),
@@ -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
),
@@ -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
),
diff --git a/datafusion/functions/benches/substr.rs b/datafusion/functions/benches/substr.rs
index 14a3389da3..1a696520c3 100644
--- a/datafusion/functions/benches/substr.rs
+++ b/datafusion/functions/benches/substr.rs
@@ -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))),
);
@@ -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,
),
@@ -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,
),
@@ -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,
),
@@ -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,
),
@@ -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,
),
@@ -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,
),