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 @@ -361,8 +361,7 @@ impl<'a> EnumVariant<'a> {
361
361
/// The complete set of fields in this variant.
362
362
pub fn fields ( & self ) -> & [ StructField < ' a > ] {
363
363
match & self . fields {
364
- EnumVariantFields :: Named ( fields) => fields,
365
- EnumVariantFields :: Unnamed ( fields) => fields,
364
+ EnumVariantFields :: Unnamed ( fields) | EnumVariantFields :: Named ( fields) => fields,
366
365
EnumVariantFields :: Unit => & [ ] ,
367
366
}
368
367
}
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