File tree 2 files changed +11
-7
lines changed
crates/bevy_reflect/derive/src
2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -401,9 +401,11 @@ impl ContainerAttributes {
401
401
// Override `lit` if this is a `FromReflect` derive.
402
402
// This typically means a user is opting out of the default implementation
403
403
// 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
+ }
407
409
} ) ?;
408
410
409
411
if let Some ( existing) = & self . from_reflect_attrs . auto_derive {
@@ -434,9 +436,11 @@ impl ContainerAttributes {
434
436
// Override `lit` if this is a `FromReflect` derive.
435
437
// This typically means a user is opting out of the default implementation
436
438
// 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
+ }
440
444
} ) ?;
441
445
442
446
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> {
1100
1100
reason = "Not currently used but may be useful in the future due to its generality."
1101
1101
) ]
1102
1102
Anonymous {
1103
- qualified_type : Type ,
1103
+ qualified_type : Box < Type > ,
1104
1104
long_type_path : StringExpr ,
1105
1105
short_type_path : StringExpr ,
1106
1106
} ,
You can’t perform that action at this time.
0 commit comments