mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-07 13:18:20 +00:00
Improved code lint
This commit is contained in:
@@ -797,7 +797,7 @@ impl VMDynamicFunction for VMDynamicFunctionWithoutEnv {
|
|||||||
|
|
||||||
struct VMDynamicFunctionWithEnv<Env>
|
struct VMDynamicFunctionWithEnv<Env>
|
||||||
where
|
where
|
||||||
Env: Sized
|
Env: Sized,
|
||||||
{
|
{
|
||||||
func: Box<dyn Fn(&mut Env, &[Val]) -> Result<Vec<Val>, RuntimeErro> + 'static>,
|
func: Box<dyn Fn(&mut Env, &[Val]) -> Result<Vec<Val>, RuntimeErro> + 'static>,
|
||||||
env: *mut Env,
|
env: *mut Env,
|
||||||
@@ -805,7 +805,7 @@ where
|
|||||||
|
|
||||||
impl<Env> VMDynamicFunction for VMDynamicFunctionWithEnv<Env>
|
impl<Env> VMDynamicFunction for VMDynamicFunctionWithEnv<Env>
|
||||||
where
|
where
|
||||||
Env: Sized
|
Env: Sized,
|
||||||
{
|
{
|
||||||
fn call(&self, args: &[Val]) -> Result<Vec<Val>, RuntimeError> {
|
fn call(&self, args: &[Val]) -> Result<Vec<Val>, RuntimeError> {
|
||||||
unsafe { (*self.func)(&mut *self.env, &args) }
|
unsafe { (*self.func)(&mut *self.env, &args) }
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
//! A trampoline generator for calling dynamic host functions from Wasm.
|
//! A trampoline generator for calling dynamic host functions from Wasm.
|
||||||
|
|
||||||
use super::binemit::TrampolineRelocSink;
|
use super::binemit::TrampolineRelocSink;
|
||||||
use crate::translator::{
|
use crate::translator::{compiled_function_unwind_info, signature_to_cranelift_ir};
|
||||||
compiled_function_unwind_info, signature_to_cranelift_ir,
|
|
||||||
};
|
|
||||||
use cranelift_codegen::ir::{
|
use cranelift_codegen::ir::{
|
||||||
types, ExternalName, Function, InstBuilder, MemFlags, StackSlotData, StackSlotKind,
|
types, ExternalName, Function, InstBuilder, MemFlags, StackSlotData, StackSlotKind,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user