From afecdd839d23e433d29e12339d28c3caa9069637 Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Mon, 11 Nov 2024 08:20:09 -0500 Subject: [PATCH] Store `Args` as structs This is to enable supporting Serde attributes on function arguments. --- macro/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/macro/src/lib.rs b/macro/src/lib.rs index 19471da3..f2425154 100644 --- a/macro/src/lib.rs +++ b/macro/src/lib.rs @@ -383,7 +383,6 @@ fn map_method_or_fn( .zip(arg_tys.iter()) .map(|(ident, ty)| { parse_quote! { - #(#attrs)* pub #ident: #ty } }) @@ -1057,7 +1056,7 @@ fn args_from_autos(idents: &[Ident], autos: &[Expr]) -> Expr { let ident = &idents[i]; let i = Literal::usize_unsuffixed(i); parse_quote! { - #ident: &autos.#i[(i + #i) % lens[#i]].clone() + #ident: autos.#i[(i + #i) % lens[#i]].clone() } }) .collect();