This is an automated email from the ASF dual-hosted git repository.
martin-g pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/avro-rs.git
The following commit(s) were added to refs/heads/main by this push:
new f13ba73 Allow `clippy::redundant_field_names` for users of
`#[darling(multiple)]` (#698)
f13ba73 is described below
commit f13ba73b1b9d118468517ba0e7d6f2359b0e27c5
Author: Martin Grigorov <[email protected]>
AuthorDate: Mon Oct 5 09:19:47 2026 +0300
Allow `clippy::redundant_field_names` for users of `#[darling(multiple)]`
(#698)
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;