Skip to content

Commit

Permalink
Store Args as structs
Browse files Browse the repository at this point in the history
This is to enable supporting Serde attributes on function arguments.
  • Loading branch information
smoelius committed Nov 11, 2024
1 parent 08202cf commit afecdd8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@ fn map_method_or_fn(
.zip(arg_tys.iter())
.map(|(ident, ty)| {
parse_quote! {
#(#attrs)*
pub #ident: #ty
}
})
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit afecdd8

Please sign in to comment.