Skip to content

Commit 3e4b487

Browse files
committed
allow more kinds of empty structs
1 parent cc8c7a3 commit 3e4b487

File tree

1 file changed

+1
-1
lines changed
  • crates/bevy_macro_utils/src

1 file changed

+1
-1
lines changed

crates/bevy_macro_utils/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ pub fn derive_label(
187187
for (i, v) in d.variants.iter().enumerate() {
188188
// Variants must either be fieldless, or explicitly ignore the fields.
189189
let ignore_fields = v.attrs.iter().any(|a| is_ignore(a, attr_name));
190-
if matches!(v.fields, syn::Fields::Unit) | ignore_fields {
190+
if v.fields.is_empty() || ignore_fields {
191191
let mut path = syn::Path::from(ident.clone());
192192
path.segments.push(v.ident.clone().into());
193193

0 commit comments

Comments
 (0)