Skip to content

Commit

Permalink
fix: usages
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Adossi <[email protected]>
  • Loading branch information
vados-cosmonic committed Oct 18, 2023
1 parent 4549c65 commit db07266
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/module/functions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
/// });
/// ```
Expand Down Expand Up @@ -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();
/// });
/// ```
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit db07266

Please sign in to comment.