This is an automated email from the ASF dual-hosted git repository.
Jefffrey pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/main by this push:
new c8eba1a0b9 chore: Fix clippy::useless_borrows_in_formatting (#10163)
c8eba1a0b9 is described below
commit c8eba1a0b9e6c307109c9f69ac2aae728b4c8cd9
Author: Thomas Tanon <[email protected]>
AuthorDate: Sun Jun 21 05:12:05 2026 +0200
chore: Fix clippy::useless_borrows_in_formatting (#10163)
Automated `clippy --fix` of the `clippy::useless_borrows_in_formatting`
lint
---
arrow-cast/src/parse.rs | 10 +++++-----
arrow-row/src/lib.rs | 2 +-
arrow-schema/src/error.rs | 4 ++--
parquet/src/schema/printer.rs | 4 ++--
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/arrow-cast/src/parse.rs b/arrow-cast/src/parse.rs
index e7c6f90e75..f4033f08b3 100644
--- a/arrow-cast/src/parse.rs
+++ b/arrow-cast/src/parse.rs
@@ -1313,7 +1313,7 @@ impl Interval {
.map_err(|_| {
ArrowError::ParseError(format!(
"Unable to represent {} centuries as months in a
signed 32-bit integer",
- &amount.integer
+ amount.integer
))
})?;
@@ -1329,7 +1329,7 @@ impl Interval {
.map_err(|_| {
ArrowError::ParseError(format!(
"Unable to represent {} decades as months in a
signed 32-bit integer",
- &amount.integer
+ amount.integer
))
})?;
@@ -1344,7 +1344,7 @@ impl Interval {
.map_err(|_| {
ArrowError::ParseError(format!(
"Unable to represent {} years as months in a
signed 32-bit integer",
- &amount.integer
+ amount.integer
))
})?;
@@ -1354,7 +1354,7 @@ impl Interval {
let months = amount.integer.try_into().map_err(|_| {
ArrowError::ParseError(format!(
"Unable to represent {} months in a signed 32-bit
integer",
- &amount.integer
+ amount.integer
))
})?;
@@ -1376,7 +1376,7 @@ impl Interval {
let days =
amount.integer.mul_checked(7)?.try_into().map_err(|_| {
ArrowError::ParseError(format!(
"Unable to represent {} weeks as days in a signed
32-bit integer",
- &amount.integer
+ amount.integer
))
})?;
diff --git a/arrow-row/src/lib.rs b/arrow-row/src/lib.rs
index dcf81562a0..379c7c2425 100644
--- a/arrow-row/src/lib.rs
+++ b/arrow-row/src/lib.rs
@@ -1052,7 +1052,7 @@ impl RowConverter {
if !row.is_empty() {
return Err(ArrowError::InvalidArgumentError(format!(
"Codecs {codecs:?} did not consume all bytes for row
{i}, remaining bytes: {row:?}",
- codecs = &self.codecs
+ codecs = self.codecs
)));
}
}
diff --git a/arrow-schema/src/error.rs b/arrow-schema/src/error.rs
index 8c113cba86..b9818b1b92 100644
--- a/arrow-schema/src/error.rs
+++ b/arrow-schema/src/error.rs
@@ -101,9 +101,9 @@ impl Display for ArrowError {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self {
ArrowError::NotYetImplemented(source) => {
- write!(f, "Not yet implemented: {}", &source)
+ write!(f, "Not yet implemented: {source}")
}
- ArrowError::ExternalError(source) => write!(f, "External error:
{}", &source),
+ ArrowError::ExternalError(source) => write!(f, "External error:
{source}"),
ArrowError::CastError(desc) => write!(f, "Cast error: {desc}"),
ArrowError::MemoryError(desc) => write!(f, "Memory error: {desc}"),
ArrowError::ParseError(desc) => write!(f, "Parser error: {desc}"),
diff --git a/parquet/src/schema/printer.rs b/parquet/src/schema/printer.rs
index 31d00fc23b..e43e09b30f 100644
--- a/parquet/src/schema/printer.rs
+++ b/parquet/src/schema/printer.rs
@@ -82,7 +82,7 @@ pub fn print_file_metadata(out: &mut dyn io::Write,
file_metadata: &FileMetaData
writeln!(
out,
" {}: {}",
- &kv.key,
+ kv.key,
kv.value.as_ref().unwrap_or(&"".to_owned())
);
}
@@ -468,7 +468,7 @@ mod tests {
let mut p = Printer::new(&mut s);
p.print(&message);
}
- println!("{}", &s);
+ println!("{s}");
let parsed = parse_message_type(&s).unwrap();
assert_eq!(message, parsed);
}