File tree 2 files changed +3
-3
lines changed
crates/bevy_reflect/bevy_reflect_derive/src
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -341,8 +341,7 @@ impl<'a> EnumVariant<'a> {
341
341
/// The complete set of fields in this variant.
342
342
pub fn fields ( & self ) -> & [ StructField < ' a > ] {
343
343
match & self . fields {
344
- EnumVariantFields :: Named ( fields) => fields,
345
- EnumVariantFields :: Unnamed ( fields) => fields,
344
+ EnumVariantFields :: Unnamed ( fields) | EnumVariantFields :: Named ( fields) => fields,
346
345
EnumVariantFields :: Unit => & [ ] ,
347
346
}
348
347
}
Original file line number Diff line number Diff line change 1
1
//! Demonstrates how reflection is used with generic Rust types.
2
2
3
3
use bevy:: prelude:: * ;
4
+ use bevy:: reflect:: GetTypeRegistration ;
4
5
use std:: any:: TypeId ;
5
6
6
7
fn main ( ) {
@@ -13,7 +14,7 @@ fn main() {
13
14
}
14
15
15
16
#[ derive( Reflect ) ]
16
- struct MyType < T : Reflect > {
17
+ struct MyType < T : Reflect + GetTypeRegistration > {
17
18
value : T ,
18
19
}
19
20
You can’t perform that action at this time.
0 commit comments