Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
iFrostizz committed May 1, 2024
1 parent f7ef944 commit 3cbba41
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
4 changes: 1 addition & 3 deletions x/programs/rust/wasmlanche-sdk/src/params.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use crate::{
memory::to_ffi_ptr, program::CPointer, state::Error as StateError, Error
};
use crate::{memory::to_ffi_ptr, program::CPointer, state::Error as StateError, Error};
use borsh::BorshSerialize;

#[macro_export]
Expand Down
13 changes: 11 additions & 2 deletions x/programs/rust/wasmlanche-sdk/src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ use std::hash::Hash;

use borsh::{BorshDeserialize, BorshSerialize};

use crate::{memory::to_ffi_ptr, state::{Error as StateError, State, Key}, Params};
use crate::{
memory::to_ffi_ptr,
state::{Error as StateError, Key, State},
Params,
};

/// Represents the current Program in the context of the caller. Or an external
/// program that is being invoked.
Expand Down Expand Up @@ -61,5 +65,10 @@ pub struct CPointer(pub *const u8, pub usize);
#[link(wasm_import_module = "program")]
extern "C" {
#[link_name = "call_program"]
fn _call_program(target_id: CPointer, function: CPointer, args_ptr: CPointer, max_units: i64) -> i64;
fn _call_program(
target_id: CPointer,
function: CPointer,
args_ptr: CPointer,
max_units: i64,
) -> i64;
}
4 changes: 2 additions & 2 deletions x/programs/rust/wasmlanche-sdk/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ mod host {
args = (caller, key, value)
} {
0 => Ok(()),
_ => Err(Error::Write)
_ => Err(Error::Write),
}
}

Expand All @@ -242,7 +242,7 @@ mod host {
args = (caller, key)
} {
0 => Ok(()),
_ => Err(Error::Delete)
_ => Err(Error::Delete),
}
}
}

0 comments on commit 3cbba41

Please sign in to comment.