forked from libre-chip/fayalite
fix clippy lints in generated code
This commit is contained in:
parent
017c14a2f1
commit
99180eb3b4
3 changed files with 13 additions and 3 deletions
|
@ -450,12 +450,21 @@ impl ModuleFn {
|
|||
let fn_name_str = fn_name.to_string();
|
||||
let (_, body_type_generics, _) = body_fn.sig.generics.split_for_impl();
|
||||
let body_turbofish_type_generics = body_type_generics.as_turbofish();
|
||||
let body_lambda = if param_names.is_empty() {
|
||||
quote! {
|
||||
__body #body_turbofish_type_generics
|
||||
}
|
||||
} else {
|
||||
quote! {
|
||||
|m| __body #body_turbofish_type_generics(m, #(#param_names,)*)
|
||||
}
|
||||
};
|
||||
let block = parse_quote! {{
|
||||
#body_fn
|
||||
::fayalite::module::ModuleBuilder::run(
|
||||
#fn_name_str,
|
||||
#module_kind_value,
|
||||
|m| __body #body_turbofish_type_generics(m, #(#param_names,)*),
|
||||
#body_lambda,
|
||||
)
|
||||
}};
|
||||
let outer_fn = ItemFn {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue