Revert "Upgrade to Rust 1.82 toolchain" (#13810)

This commit is contained in:
Micha Reiser 2024-10-18 14:18:26 +02:00 committed by GitHub
parent ff72055558
commit 6d7da7bdbe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 51 additions and 55 deletions

View file

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