Upgrade to Rust 1.82 toolchain (#13808)

This commit is contained in:
Micha Reiser 2024-10-18 14:08:15 +02:00 committed by GitHub
parent 4ecfe95295
commit ff72055558
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 54 additions and 50 deletions

View file

@ -75,12 +75,11 @@ pub(crate) fn derive_cache_key(item: &DeriveInput) -> syn::Result<TokenStream> {
}
}
let field_attr = match &field.ident {
Some(ident) => quote!(self.#ident),
None => {
let index = syn::Index::from(i);
quote!(self.#index)
}
let field_attr = if let Some(ident) = &field.ident {
quote!(self.#ident)
} else {
let index = syn::Index::from(i);
quote!(self.#index)
};
fields.push(quote!(#field_attr.cache_key(key);));