From 6abc9510fa7fd3ec0cb3e624d8f5a1dc4c650c10 Mon Sep 17 00:00:00 2001 From: Robin Freyler Date: Sat, 2 Dec 2023 17:57:16 +0100 Subject: [PATCH] cleanup parameters in translate (#822) * cleanup parameters in translate * apply rustfmt --- crates/wasmi/src/module/compile/mod.rs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/crates/wasmi/src/module/compile/mod.rs b/crates/wasmi/src/module/compile/mod.rs index 12fe951b5c..ee4500f77d 100644 --- a/crates/wasmi/src/module/compile/mod.rs +++ b/crates/wasmi/src/module/compile/mod.rs @@ -23,21 +23,14 @@ mod block_type; /// If the function body fails to validate. pub fn translate<'parser>( func: FuncIdx, - compiled_func_2: CompiledFunc, + compiled_func: CompiledFunc, func_body: FunctionBody<'parser>, validator: FuncValidator, res: ModuleResources<'parser>, allocations: FuncTranslatorAllocations, ) -> Result { - FunctionTranslator::new( - func, - compiled_func_2, - func_body, - validator, - res, - allocations, - )? - .translate() + FunctionTranslator::new(func, compiled_func, func_body, validator, res, allocations)? + .translate() } /// Translates Wasm bytecode into `wasmi` bytecode for a single Wasm function. @@ -52,14 +45,14 @@ impl<'parser> FunctionTranslator<'parser> { /// Creates a new Wasm to `wasmi` bytecode function translator. fn new( func: FuncIdx, - compiled_func_2: CompiledFunc, + compiled_func: CompiledFunc, func_body: FunctionBody<'parser>, validator: FuncValidator, res: ModuleResources<'parser>, allocations: FuncTranslatorAllocations, ) -> Result { let func_builder = - ValidatingFuncTranslator::new(func, compiled_func_2, res, validator, allocations)?; + ValidatingFuncTranslator::new(func, compiled_func, res, validator, allocations)?; Ok(Self { func_body, func_builder,