Skip to content

Commit b3c3980

Browse files
committed
codegen: Minor cleanup after #1691.
1 parent 560354e commit b3c3980

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/codegen/mod.rs

+6-7
Original file line numberDiff line numberDiff line change
@@ -3612,22 +3612,21 @@ impl CodeGenerator for Function {
36123612
}
36133613

36143614
// Unfortunately this can't piggyback on the `attributes` list because
3615-
// the #[link(wasm_import_module)] needs to happen before the `extern "C"` block.
3616-
// it doesn't get picked up properly otherwise
3615+
// the #[link(wasm_import_module)] needs to happen before the `extern
3616+
// "C"` block. It doesn't get picked up properly otherwise
36173617
let wasm_link_attribute =
36183618
ctx.options().wasm_import_module_name.as_ref().map(|name| {
3619-
quote! {
3620-
#[link(wasm_import_module = #name)]
3621-
}
3619+
quote! { #[link(wasm_import_module = #name)] }
36223620
});
36233621

36243622
let ident = ctx.rust_ident(canonical_name);
3625-
let tokens = quote!(
3623+
let tokens = quote! {
36263624
#wasm_link_attribute
36273625
extern #abi {
36283626
#(#attributes)*
36293627
pub fn #ident ( #( #args ),* ) #ret;
3630-
});
3628+
}
3629+
};
36313630
result.push(tokens);
36323631
}
36333632
}

0 commit comments

Comments
 (0)