Skip to content

Commit

Permalink
chore: Make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
xdoardo committed Nov 26, 2024
1 parent 81f4195 commit 234dbea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/api/src/rt/sys/entities/function/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ macro_rules! impl_host_function {
let results = body(vmctx, $( $x ),*);
Rets::write_c_struct_to_ptr(results, args);
}

call_trampoline::<$( $x, )* Rets> as _

}
Expand Down
8 changes: 6 additions & 2 deletions lib/api/src/rt/wamr/entities/function/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ impl Function {
let mut store = store.as_store_mut();
let inner = store.inner.store.as_wamr().inner;

let callback: CCallback = unsafe { std::mem::transmute(func.function_callback(crate::Runtime::Wamr).into_wamr()) };
let callback: CCallback = unsafe {
std::mem::transmute(func.function_callback(crate::Runtime::Wamr).into_wamr())
};

let mut callback_env: *mut FunctionCallbackEnv<'_, F> =
Box::into_raw(Box::new(FunctionCallbackEnv {
Expand Down Expand Up @@ -274,7 +276,9 @@ impl Function {
let mut store = store.as_store_mut();
let inner = store.inner.store.as_wamr().inner;

let callback: CCallback = unsafe { std::mem::transmute(func.function_callback(crate::Runtime::Wamr).into_wamr()) };
let callback: CCallback = unsafe {
std::mem::transmute(func.function_callback(crate::Runtime::Wamr).into_wamr())
};

let mut callback_env: *mut FunctionCallbackEnv<'_, F> =
Box::into_raw(Box::new(FunctionCallbackEnv {
Expand Down

0 comments on commit 234dbea

Please sign in to comment.