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.
This commit is contained in:
Nicholas Nethercote 2025-07-01 21:51:37 +10:00
parent ed1a5ab94a
commit 169307e781

View File

@ -865,7 +865,7 @@ impl<'a> ReflectEnum<'a> {
crate::registration::impl_get_type_registration( crate::registration::impl_get_type_registration(
where_clause_options, where_clause_options,
None, None,
Some(self.active_fields().map(StructField::reflected_type)), Some(self.active_types().iter()),
) )
} }