This is an automated email from the ASF dual-hosted git repository.

zeroshade pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new 4698cedae chore(rust/ffi): make clippy happy (#4026)
4698cedae is described below

commit 4698cedae992e8ea541ff55fa9e7c3f7b6abc8fa
Author: Matt Topol <[email protected]>
AuthorDate: Fri Feb 27 12:55:28 2026 -0500

    chore(rust/ffi): make clippy happy (#4026)
    
    see
    
https://github.com/apache/arrow-adbc/actions/runs/22465659102/job/65072292063
---
 rust/ffi/src/driver_exporter.rs | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/rust/ffi/src/driver_exporter.rs b/rust/ffi/src/driver_exporter.rs
index e4573ac55..634263970 100644
--- a/rust/ffi/src/driver_exporter.rs
+++ b/rust/ffi/src/driver_exporter.rs
@@ -1888,19 +1888,15 @@ extern "C" fn 
statement_get_parameter_schema<DriverType: Driver>(
 
 unsafe extern "C" fn error_get_detail_count(error: *const FFI_AdbcError) -> 
c_int {
     match error.as_ref() {
-        None => 0,
-        Some(error) => {
-            if !error.private_data.is_null() {
-                let private_data = error.private_data as *const 
ErrorPrivateData;
-                (*private_data)
-                    .keys
-                    .len()
-                    .try_into()
-                    .expect("Overflow with error detail count")
-            } else {
-                0
-            }
+        Some(error) if !error.private_data.is_null() => {
+            let private_data = error.private_data as *const ErrorPrivateData;
+            (*private_data)
+                .keys
+                .len()
+                .try_into()
+                .expect("Overflow with error detail count")
         }
+        _ => 0,
     }
 }
 

Reply via email to