Missing fmt

This commit is contained in:
Daniel 2026-01-21 15:38:50 +01:00
parent 17b36b924e
commit ec6caee2dc
4 changed files with 10 additions and 8 deletions

View File

@ -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)

View File

@ -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,

View File

@ -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;

View File

@ -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);