This is an automated email from the ASF dual-hosted git repository. martin-g pushed a commit to branch workaround-darling-441 in repository https://gitbox.apache.org/repos/asf/avro-rs.git
commit 377b9a9e83fa0ea437b810a84673808beb51dff4 Author: Martin Tzvetanov Grigorov <[email protected]> AuthorDate: Mon Oct 5 09:12:58 2026 +0300 Allow `clippy::redundant_field_names` for users of `#[darling(multiple)]` A workaround until https://github.com/TedDriggs/darling/pull/441 is released --- avro_derive/src/attributes/avro.rs | 5 +++++ avro_derive/src/attributes/serde.rs | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/avro_derive/src/attributes/avro.rs b/avro_derive/src/attributes/avro.rs index bc8b5ef..5b626e8 100644 --- a/avro_derive/src/attributes/avro.rs +++ b/avro_derive/src/attributes/avro.rs @@ -21,6 +21,11 @@ //! Although a user will mostly use the Serde attributes, there are some Avro specific attributes //! a user can use. These add extra metadata to the generated schema. +// `darling` generates `field: field` for `#[darling(multiple)]` fields using the field's own +// span, which Clippy 1.99+ reports as `redundant_field_names` on the struct definition. +// TODO: Remove once https://github.com/TedDriggs/darling/pull/441 is released +#![expect(clippy::redundant_field_names)] + use crate::attributes::FieldDefault; use crate::case::RenameRule; use darling::FromMeta; diff --git a/avro_derive/src/attributes/serde.rs b/avro_derive/src/attributes/serde.rs index f8429e1..1843a48 100644 --- a/avro_derive/src/attributes/serde.rs +++ b/avro_derive/src/attributes/serde.rs @@ -25,6 +25,11 @@ //! //! If Serde adds new attributes they need to be added here too. +// `darling` generates `field: field` for `#[darling(multiple)]` fields using the field's own +// span, which Clippy 1.99+ reports as `redundant_field_names` on the struct definition. +// TODO: Remove once https://github.com/TedDriggs/darling/pull/441 is released +#![expect(clippy::redundant_field_names)] + use darling::{FromAttributes, FromMeta}; use syn::Expr;
