working
This commit is contained in:
parent
e69bcfc23d
commit
b09e8eafbb
16 changed files with 2531 additions and 258 deletions
|
|
@ -47,8 +47,8 @@ fn extract_args(inputs: &Punctuated<syn::FnArg, Comma>, class: Class, default: C
|
|||
for arg in inputs.iter().skip(1) {
|
||||
if let syn::FnArg::Typed(pat_type) = arg {
|
||||
//if pat_type.attrs.iter().any(|a| a.path().is_ident(path)) {
|
||||
if Class::classify(&pat_type, default) == class {
|
||||
if let syn::Pat::Ident(pat_ident) = &*pat_type.pat {
|
||||
if Class::classify(pat_type, default) == class
|
||||
&& let syn::Pat::Ident(pat_ident) = &*pat_type.pat {
|
||||
idents.push(pat_ident.ident.clone());
|
||||
types.push((*pat_type.ty).clone());
|
||||
let meta = pat_type.attrs.iter()
|
||||
|
|
@ -58,7 +58,6 @@ fn extract_args(inputs: &Punctuated<syn::FnArg, Comma>, class: Class, default: C
|
|||
};
|
||||
attrs.push(meta);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
(idents, types, attrs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue