From f59ae01cfc8fdeaf075a27576f3c75217ffe723a Mon Sep 17 00:00:00 2001
From: David Li
Date: Tue, 1 Jul 2025 09:56:20 +0900
Subject: [PATCH] chore(rust): fix new clippy lints
Fixes #3075.
---
rust/core/src/driver_exporter.rs | 6 +++---
rust/core/src/options.rs | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/rust/core/src/driver_exporter.rs b/rust/core/src/driver_exporter.rs
index dd10a8fa06..3ea52f3649 100644
--- a/rust/core/src/driver_exporter.rs
+++ b/rust/core/src/driver_exporter.rs
@@ -1632,9 +1632,9 @@ unsafe extern "C" fn error_get_detail(
}
let private_data = error.private_data as *const ErrorPrivateData;
- let key = (*private_data).keys[index].as_ptr();
- let value = (*private_data).values[index].as_ptr();
- let value_length = (*private_data).values[index].len();
+ let key = (&(*private_data).keys)[index].as_ptr();
+ let value = (&(*private_data).values)[index].as_ptr();
+ let value_length = (&(*private_data).values)[index].len();
FFI_AdbcErrorDetail {
key,
diff --git a/rust/core/src/options.rs b/rust/core/src/options.rs
index 0d3af92fff..7e3e443bdc 100644
--- a/rust/core/src/options.rs
+++ b/rust/core/src/options.rs
@@ -621,7 +621,7 @@ impl TryFrom for Statistics {
constants::ADBC_STATISTIC_NULL_COUNT_KEY => Ok(Self::NullCount),
constants::ADBC_STATISTIC_ROW_COUNT_KEY => Ok(Self::RowCount),
_ => Err(Error::with_message_and_status(
- format!("Unknown standard statistic key: {}", value),
+ format!("Unknown standard statistic key: {value}"),
Status::InvalidArguments,
)),
}