@@ -62,8 +62,8 @@ pub(crate) fn impl_enum(reflect_enum: &ReflectEnum) -> proc_macro2::TokenStream
6262 let full_reflect_impl = impl_full_reflect ( & where_clause_options) ;
6363 let common_methods = common_partial_reflect_methods (
6464 reflect_enum. meta ( ) ,
65- || Some ( quote ! ( #bevy_reflect_path:: enum_partial_eq) ) ,
66- || Some ( quote ! ( #bevy_reflect_path:: enum_hash) ) ,
65+ || Some ( quote ! ( #bevy_reflect_path:: enums :: enum_partial_eq) ) ,
66+ || Some ( quote ! ( #bevy_reflect_path:: enums :: enum_hash) ) ,
6767 ) ;
6868 let clone_fn = reflect_enum. get_clone_impl ( ) ;
6969
@@ -97,7 +97,7 @@ pub(crate) fn impl_enum(reflect_enum: &ReflectEnum) -> proc_macro2::TokenStream
9797
9898 #auto_register
9999
100- impl #impl_generics #bevy_reflect_path:: Enum for #enum_path #ty_generics #where_reflect_clause {
100+ impl #impl_generics #bevy_reflect_path:: enums :: Enum for #enum_path #ty_generics #where_reflect_clause {
101101 fn field( & self , #ref_name: & str ) -> #FQOption <& dyn #bevy_reflect_path:: PartialReflect > {
102102 match #match_this {
103103 #( #enum_field, ) *
@@ -140,8 +140,8 @@ pub(crate) fn impl_enum(reflect_enum: &ReflectEnum) -> proc_macro2::TokenStream
140140 }
141141 }
142142
143- fn iter_fields( & self ) -> #bevy_reflect_path:: VariantFieldIter {
144- #bevy_reflect_path:: VariantFieldIter :: new( self )
143+ fn iter_fields( & self ) -> #bevy_reflect_path:: enums :: VariantFieldIter {
144+ #bevy_reflect_path:: enums :: VariantFieldIter :: new( self )
145145 }
146146
147147 #[ inline]
@@ -169,15 +169,15 @@ pub(crate) fn impl_enum(reflect_enum: &ReflectEnum) -> proc_macro2::TokenStream
169169 }
170170
171171 #[ inline]
172- fn variant_type( & self ) -> #bevy_reflect_path:: VariantType {
172+ fn variant_type( & self ) -> #bevy_reflect_path:: enums :: VariantType {
173173 match #match_this {
174174 #( #enum_variant_type, ) *
175175 _ => unreachable!( ) ,
176176 }
177177 }
178178
179- fn to_dynamic_enum( & self ) -> #bevy_reflect_path:: DynamicEnum {
180- #bevy_reflect_path:: DynamicEnum :: from_ref:: <Self >( self )
179+ fn to_dynamic_enum( & self ) -> #bevy_reflect_path:: enums :: DynamicEnum {
180+ #bevy_reflect_path:: enums :: DynamicEnum :: from_ref:: <Self >( self )
181181 }
182182 }
183183
@@ -194,20 +194,20 @@ pub(crate) fn impl_enum(reflect_enum: &ReflectEnum) -> proc_macro2::TokenStream
194194 ) -> #FQResult <( ) , #bevy_reflect_path:: ApplyError > {
195195 if let #bevy_reflect_path:: ReflectRef :: Enum ( #ref_value) =
196196 #bevy_reflect_path:: PartialReflect :: reflect_ref( #ref_value) {
197- if #bevy_reflect_path:: Enum :: variant_name( self ) == #bevy_reflect_path:: Enum :: variant_name( #ref_value) {
197+ if #bevy_reflect_path:: enums :: Enum :: variant_name( self ) == #bevy_reflect_path:: enums :: Enum :: variant_name( #ref_value) {
198198 // Same variant -> just update fields
199- match #bevy_reflect_path:: Enum :: variant_type( #ref_value) {
200- #bevy_reflect_path:: VariantType :: Struct => {
201- for field in #bevy_reflect_path:: Enum :: iter_fields( #ref_value) {
199+ match #bevy_reflect_path:: enums :: Enum :: variant_type( #ref_value) {
200+ #bevy_reflect_path:: enums :: VariantType :: Struct => {
201+ for field in #bevy_reflect_path:: enums :: Enum :: iter_fields( #ref_value) {
202202 let name = field. name( ) . unwrap( ) ;
203- if let #FQOption :: Some ( v) = #bevy_reflect_path:: Enum :: field_mut( self , name) {
203+ if let #FQOption :: Some ( v) = #bevy_reflect_path:: enums :: Enum :: field_mut( self , name) {
204204 #bevy_reflect_path:: PartialReflect :: try_apply( v, field. value( ) ) ?;
205205 }
206206 }
207207 }
208- #bevy_reflect_path:: VariantType :: Tuple => {
209- for ( index, field) in :: core:: iter:: Iterator :: enumerate( #bevy_reflect_path:: Enum :: iter_fields( #ref_value) ) {
210- if let #FQOption :: Some ( v) = #bevy_reflect_path:: Enum :: field_at_mut( self , index) {
208+ #bevy_reflect_path:: enums :: VariantType :: Tuple => {
209+ for ( index, field) in :: core:: iter:: Iterator :: enumerate( #bevy_reflect_path:: enums :: Enum :: iter_fields( #ref_value) ) {
210+ if let #FQOption :: Some ( v) = #bevy_reflect_path:: enums :: Enum :: field_at_mut( self , index) {
211211 #bevy_reflect_path:: PartialReflect :: try_apply( v, field. value( ) ) ?;
212212 }
213213 }
@@ -216,7 +216,7 @@ pub(crate) fn impl_enum(reflect_enum: &ReflectEnum) -> proc_macro2::TokenStream
216216 }
217217 } else {
218218 // New variant -> perform a switch
219- match #bevy_reflect_path:: Enum :: variant_name( #ref_value) {
219+ match #bevy_reflect_path:: enums :: Enum :: variant_name( #ref_value) {
220220 #( #variant_names => {
221221 #deref_this = #variant_constructors
222222 } ) *
@@ -309,7 +309,7 @@ fn generate_impls(reflect_enum: &ReflectEnum, ref_index: &Ident, ref_name: &Iden
309309 #unit{ ..} => #variant_index
310310 } ) ;
311311 enum_variant_type. push ( quote ! {
312- #unit{ ..} => #bevy_reflect_path:: VariantType :: #variant_type_ident
312+ #unit{ ..} => #bevy_reflect_path:: enums :: VariantType :: #variant_type_ident
313313 } ) ;
314314
315315 fn process_fields (
0 commit comments