Skip to content

Commit 169307e

Browse files
committed
Use active_types in ReflectEnum::get_type_registration.
Instead of `active_fields`. This makes it match `ReflectStruct`, and avoids redundant calls within the generated `register_type_dependencies` when the same type is used in multiple enum variant fields.
1 parent ed1a5ab commit 169307e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_reflect/derive/src/derive_data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ impl<'a> ReflectEnum<'a> {
865865
crate::registration::impl_get_type_registration(
866866
where_clause_options,
867867
None,
868-
Some(self.active_fields().map(StructField::reflected_type)),
868+
Some(self.active_types().iter()),
869869
)
870870
}
871871

0 commit comments

Comments
 (0)