File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
crates/bevy_reflect/derive/src Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -401,9 +401,11 @@ impl ContainerAttributes {
401401 // Override `lit` if this is a `FromReflect` derive.
402402 // This typically means a user is opting out of the default implementation
403403 // from the `Reflect` derive and using the `FromReflect` derive directly instead.
404- ( trait_ == ReflectTraitToImpl :: FromReflect )
405- . then ( || LitBool :: new ( true , Span :: call_site ( ) ) )
406- . unwrap_or_else ( || lit. clone ( ) )
404+ if trait_ == ReflectTraitToImpl :: FromReflect {
405+ LitBool :: new ( true , Span :: call_site ( ) )
406+ } else {
407+ lit. clone ( )
408+ }
407409 } ) ?;
408410
409411 if let Some ( existing) = & self . from_reflect_attrs . auto_derive {
@@ -434,9 +436,11 @@ impl ContainerAttributes {
434436 // Override `lit` if this is a `FromReflect` derive.
435437 // This typically means a user is opting out of the default implementation
436438 // from the `Reflect` derive and using the `FromReflect` derive directly instead.
437- ( trait_ == ReflectTraitToImpl :: TypePath )
438- . then ( || LitBool :: new ( true , Span :: call_site ( ) ) )
439- . unwrap_or_else ( || lit. clone ( ) )
439+ if trait_ == ReflectTraitToImpl :: TypePath {
440+ LitBool :: new ( true , Span :: call_site ( ) )
441+ } else {
442+ lit. clone ( )
443+ }
440444 } ) ?;
441445
442446 if let Some ( existing) = & self . type_path_attrs . auto_derive {
Original file line number Diff line number Diff line change @@ -1100,7 +1100,7 @@ pub(crate) enum ReflectTypePath<'a> {
11001100 reason = "Not currently used but may be useful in the future due to its generality."
11011101 ) ]
11021102 Anonymous {
1103- qualified_type : Type ,
1103+ qualified_type : Box < Type > ,
11041104 long_type_path : StringExpr ,
11051105 short_type_path : StringExpr ,
11061106 } ,
You can’t perform that action at this time.
0 commit comments