Skip to content

Commit 9dd48e1

Browse files
committed
Fix CI errors
1 parent 096611b commit 9dd48e1

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
@@ -341,8 +341,7 @@ impl<'a> EnumVariant<'a> {
341341
/// The complete set of fields in this variant.
342342
pub fn fields(&self) -> &[StructField<'a>] {
343343
match &self.fields {
344-
EnumVariantFields::Named(fields) => fields,
345-
EnumVariantFields::Unnamed(fields) => fields,
344+
EnumVariantFields::Unnamed(fields) | EnumVariantFields::Named(fields) => fields,
346345
EnumVariantFields::Unit => &[],
347346
}
348347
}

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)