Rename some local variables

This commit is contained in:
Charlie Marsh 2023-02-07 16:24:53 -05:00
parent 67e9ff7cc8
commit 2f7f4943e3
2 changed files with 23 additions and 22 deletions

View file

@ -27,7 +27,7 @@ pub fn derive_impl(input: DeriveInput) -> syn::Result<proc_macro2::TokenStream>
let prefixes: Result<Vec<_>, _> = variant
.attrs
.iter()
.filter(|a| a.path.is_ident("prefix"))
.filter(|attr| attr.path.is_ident("prefix"))
.map(|attr| {
let Ok(Meta::NameValue(MetaNameValue{lit: Lit::Str(lit), ..})) = attr.parse_meta() else {
return Err(Error::new(attr.span(), r#"expected attribute to be in the form of [#prefix = "..."]"#));
@ -54,7 +54,7 @@ pub fn derive_impl(input: DeriveInput) -> syn::Result<proc_macro2::TokenStream>
));
}
let Some(doc_attr) = variant.attrs.iter().find(|a| a.path.is_ident("doc")) else {
let Some(doc_attr) = variant.attrs.iter().find(|attr| attr.path.is_ident("doc")) else {
return Err(Error::new(variant.span(), r#"expected a doc comment"#))
};