From db072665490557cd024efe38fabe9c93e52630ed Mon Sep 17 00:00:00 2001 From: Victor Adossi Date: Thu, 19 Oct 2023 03:40:31 +0900 Subject: [PATCH] fix: usages Signed-off-by: Victor Adossi --- src/module/functions/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/module/functions/mod.rs b/src/module/functions/mod.rs index b4d3952b..1b26307b 100644 --- a/src/module/functions/mod.rs +++ b/src/module/functions/mod.rs @@ -453,7 +453,7 @@ impl Module { /// For example, if you wanted to replace an exported function with a no-op, /// /// ```ignore - /// module.replace_exported_func(fid, |body| { + /// module.replace_exported_func(fid, |(body, arg_locals)| { /// builder.func_body().unreachable(); /// }); /// ``` @@ -507,7 +507,7 @@ impl Module { /// For example, if you wanted to replace an imported function with a no-op, /// /// ```ignore - /// module.replace_imported_func(fid, |body| { + /// module.replace_imported_func(fid, |(body, arg_locals)| { /// builder.func_body().unreachable(); /// }); /// ``` @@ -746,7 +746,7 @@ mod tests { // Replace the existing function with a new one with a reversed const value let new_fn_id = module - .replace_exported_func(original_fn_id, |body| { + .replace_exported_func(original_fn_id, |(body, _arg_locals)| { body.unreachable(); }) .expect("export function replacement worked"); @@ -825,7 +825,7 @@ mod tests { // Replace the existing function with a new one with a reversed const value let new_fn_id = module - .replace_imported_func(original_fn_id, |body| { + .replace_imported_func(original_fn_id, |(body, _arg_locals)| { body.unreachable(); }) .expect("import fn replacement worked");