From ec6caee2dc792f81551b8dc00569a77581abb8b0 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 21 Jan 2026 15:38:50 +0100 Subject: [PATCH] Missing fmt --- wallet-ffi/build.rs | 4 ++-- wallet-ffi/src/keys.rs | 4 +--- wallet-ffi/src/transfer.rs | 2 +- wallet-ffi/src/wallet.rs | 8 ++++++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/wallet-ffi/build.rs b/wallet-ffi/build.rs index 2d1b0cca..63ee0d9e 100644 --- a/wallet-ffi/build.rs +++ b/wallet-ffi/build.rs @@ -1,8 +1,8 @@ fn main() { let crate_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap(); - let config = cbindgen::Config::from_file("cbindgen.toml") - .expect("Unable to read cbindgen.toml"); + let config = + cbindgen::Config::from_file("cbindgen.toml").expect("Unable to read cbindgen.toml"); cbindgen::Builder::new() .with_crate(crate_dir) diff --git a/wallet-ffi/src/keys.rs b/wallet-ffi/src/keys.rs index d4a29e11..779dbce1 100644 --- a/wallet-ffi/src/keys.rs +++ b/wallet-ffi/src/keys.rs @@ -147,9 +147,7 @@ pub extern "C" fn wallet_ffi_free_private_account_keys(keys: *mut FfiPrivateAcco unsafe { let keys = &*keys; - if !keys.incoming_viewing_public_key.is_null() - && keys.incoming_viewing_public_key_len > 0 - { + if !keys.incoming_viewing_public_key.is_null() && keys.incoming_viewing_public_key_len > 0 { let slice = std::slice::from_raw_parts_mut( keys.incoming_viewing_public_key as *mut u8, keys.incoming_viewing_public_key_len, diff --git a/wallet-ffi/src/transfer.rs b/wallet-ffi/src/transfer.rs index d52ee9a8..3c0c8edb 100644 --- a/wallet-ffi/src/transfer.rs +++ b/wallet-ffi/src/transfer.rs @@ -1,6 +1,6 @@ //! Token transfer functions. -use std::ffi::{CString, c_ulonglong}; +use std::ffi::{c_ulonglong, CString}; use std::ptr; use common::error::ExecutionFailureKind; diff --git a/wallet-ffi/src/wallet.rs b/wallet-ffi/src/wallet.rs index 151bda94..7c70e19d 100644 --- a/wallet-ffi/src/wallet.rs +++ b/wallet-ffi/src/wallet.rs @@ -17,7 +17,9 @@ pub(crate) struct WalletWrapper { } /// Helper to get the wallet wrapper from an opaque handle. -pub(crate) fn get_wallet(handle: *mut WalletHandle) -> Result<&'static WalletWrapper, WalletFfiError> { +pub(crate) fn get_wallet( + handle: *mut WalletHandle, +) -> Result<&'static WalletWrapper, WalletFfiError> { if handle.is_null() { set_last_error("Null wallet handle"); return Err(WalletFfiError::NullPointer); @@ -27,7 +29,9 @@ pub(crate) fn get_wallet(handle: *mut WalletHandle) -> Result<&'static WalletWra /// Helper to get a mutable reference to the wallet wrapper. #[allow(dead_code)] -pub(crate) fn get_wallet_mut(handle: *mut WalletHandle) -> Result<&'static mut WalletWrapper, WalletFfiError> { +pub(crate) fn get_wallet_mut( + handle: *mut WalletHandle, +) -> Result<&'static mut WalletWrapper, WalletFfiError> { if handle.is_null() { set_last_error("Null wallet handle"); return Err(WalletFfiError::NullPointer);