mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-02-14 10:23:08 +00:00
Missing fmt
This commit is contained in:
parent
17b36b924e
commit
ec6caee2dc
@ -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)
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user