Skip to content

Commit c30c7e1

Browse files
committed
Cargo fmt
1 parent b1a06d0 commit c30c7e1

File tree

6 files changed

+9
-15
lines changed

6 files changed

+9
-15
lines changed

datafusion/expr-common/src/type_coercion/binary.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ impl<'a> BinaryTypeCoercer<'a> {
204204
}
205205
And | Or => if matches!((lhs, rhs), (Boolean | Null, Boolean | Null)) {
206206
// Logical binary boolean operators can only be evaluated for
207-
// boolean or null arguments.
207+
// boolean or null arguments.
208208
Ok(Signature::uniform(Boolean))
209209
} else {
210210
plan_err!(
@@ -694,7 +694,7 @@ pub fn try_type_union_resolution_with_struct(
694694
keys_string = Some(keys);
695695
}
696696
} else {
697-
return exec_err!("Expect to get struct but got {}", data_type);
697+
return exec_err!("Expect to get struct but got {data_type}");
698698
}
699699
}
700700

@@ -726,7 +726,7 @@ pub fn try_type_union_resolution_with_struct(
726726
}
727727
}
728728
} else {
729-
return exec_err!("Expect to get struct but got {}", data_type);
729+
return exec_err!("Expect to get struct but got {data_type}");
730730
}
731731
}
732732

datafusion/expr/src/logical_plan/plan.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4155,10 +4155,7 @@ fn get_unnested_columns(
41554155
}))
41564156
}
41574157
_ => {
4158-
return internal_err!(
4159-
"trying to unnest on invalid data type {}",
4160-
data_type
4161-
);
4158+
return internal_err!("trying to unnest on invalid data type {data_type}");
41624159
}
41634160
};
41644161
Ok(qualified_columns)
@@ -4182,7 +4179,7 @@ fn get_unnested_list_datatype_recursive(
41824179
_ => {}
41834180
};
41844181

4185-
internal_err!("trying to unnest on invalid data type {}", data_type)
4182+
internal_err!("trying to unnest on invalid data type {data_type}")
41864183
}
41874184

41884185
#[cfg(test)]

datafusion/expr/src/test/function_stub.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ impl AggregateUDFImpl for Sum {
141141
dt if dt.is_signed_integer() => Ok(DataType::Int64),
142142
dt if dt.is_unsigned_integer() => Ok(DataType::UInt64),
143143
dt if dt.is_floating() => Ok(DataType::Float64),
144-
_ => exec_err!("Sum not supported for {}", data_type),
144+
_ => exec_err!("Sum not supported for {data_type}"),
145145
}
146146
}
147147

datafusion/functions-aggregate/src/sum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ impl AggregateUDFImpl for Sum {
151151
dt if dt.is_signed_integer() => Ok(DataType::Int64),
152152
dt if dt.is_unsigned_integer() => Ok(DataType::UInt64),
153153
dt if dt.is_floating() => Ok(DataType::Float64),
154-
_ => exec_err!("Sum not supported for {}", data_type),
154+
_ => exec_err!("Sum not supported for {data_type}"),
155155
}
156156
}
157157

datafusion/functions-nested/src/extract.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ fn array_any_value_inner(args: &[ArrayRef]) -> Result<ArrayRef> {
939939
let array = as_large_list_array(&array)?;
940940
general_array_any_value::<i64>(array)
941941
}
942-
data_type => exec_err!("array_any_value does not support type: {}", data_type),
942+
data_type => exec_err!("array_any_value does not support type: {data_type}"),
943943
}
944944
}
945945

datafusion/functions/src/datetime/to_timestamp.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,7 @@ impl ScalarUDFImpl for ToTimestampFunc {
368368
}
369369
}
370370
other => {
371-
exec_err!(
372-
"Unsupported data type {} for function to_timestamp",
373-
other
374-
)
371+
exec_err!("Unsupported data type {other} for function to_timestamp")
375372
}
376373
}
377374
}

0 commit comments

Comments
 (0)