Skip to content

Commit 0cc73be

Browse files
committed
Fix CI errors
1 parent 3ebcf82 commit 0cc73be

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

crates/bevy_reflect/bevy_reflect_derive/src/derive_data.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,7 @@ impl<'a> EnumVariant<'a> {
361361
/// The complete set of fields in this variant.
362362
pub fn fields(&self) -> &[StructField<'a>] {
363363
match &self.fields {
364-
EnumVariantFields::Named(fields) => fields,
365-
EnumVariantFields::Unnamed(fields) => fields,
364+
EnumVariantFields::Unnamed(fields) | EnumVariantFields::Named(fields) => fields,
366365
EnumVariantFields::Unit => &[],
367366
}
368367
}

examples/reflection/generic_reflection.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! Demonstrates how reflection is used with generic Rust types.
22
33
use bevy::prelude::*;
4+
use bevy::reflect::GetTypeRegistration;
45
use std::any::TypeId;
56

67
fn main() {
@@ -13,7 +14,7 @@ fn main() {
1314
}
1415

1516
#[derive(Reflect)]
16-
struct MyType<T: Reflect> {
17+
struct MyType<T: Reflect + GetTypeRegistration> {
1718
value: T,
1819
}
1920

0 commit comments

Comments
 (0)