Skip to content

Commit 22a2705

Browse files
committed
fix: Inline format args to satisfy clippy::uninlined_format_args
1 parent 9498cb2 commit 22a2705

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • datafusion/spark/src/function/string

datafusion/spark/src/function/string/encode.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ fn encode_dispatch(arr: &ArrayRef, charset: &str) -> Result<ArrayRef> {
168168
}
169169
Ok(Arc::new(builder.finish()))
170170
}
171-
dt => exec_err!("encode expects a string or binary argument, got {:?}", dt),
171+
dt => exec_err!("encode expects a string or binary argument, got {dt:?}"),
172172
}
173173
}
174174

@@ -204,7 +204,7 @@ fn extract_charset(charset_arg: &ColumnarValue) -> Result<String> {
204204
DataType::Utf8 => validate_constant_charset(&arr.as_string::<i32>()),
205205
DataType::LargeUtf8 => validate_constant_charset(&arr.as_string::<i64>()),
206206
DataType::Utf8View => validate_constant_charset(&arr.as_string_view()),
207-
dt => exec_err!("encode charset argument must be a string, got {:?}", dt),
207+
dt => exec_err!("encode charset argument must be a string, got {dt:?}"),
208208
}
209209
}
210210
}
@@ -294,7 +294,7 @@ mod tests {
294294
fn expect_binary_scalar(result: ColumnarValue) -> Vec<u8> {
295295
match result {
296296
ColumnarValue::Scalar(ScalarValue::Binary(Some(bytes))) => bytes,
297-
other => panic!("Expected Binary scalar, got {:?}", other),
297+
other => panic!("Expected Binary scalar, got {other:?}"),
298298
}
299299
}
300300

0 commit comments

Comments
 (0)