Skip to content

Commit 4fd092f

Browse files
committed
fix typo in bevy_reflect::impls::std GetTypeRegistration for vec like… (#7520)
Implementing GetTypeRegistration in macro impl_reflect_for_veclike! had typos! It only implement GetTypeRegistration for Vec<T>, but not for VecDeque<T>. This will cause serialization and deserialization failure.
1 parent dcc0372 commit 4fd092f

File tree

1 file changed

+2
-2
lines changed
  • crates/bevy_reflect/src/impls

1 file changed

+2
-2
lines changed

crates/bevy_reflect/src/impls/std.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@ macro_rules! impl_reflect_for_veclike {
317317

318318
impl<T: FromReflect> GetTypeRegistration for $ty {
319319
fn get_type_registration() -> TypeRegistration {
320-
let mut registration = TypeRegistration::of::<Vec<T>>();
321-
registration.insert::<ReflectFromPtr>(FromType::<Vec<T>>::from_type());
320+
let mut registration = TypeRegistration::of::<$ty>();
321+
registration.insert::<ReflectFromPtr>(FromType::<$ty>::from_type());
322322
registration
323323
}
324324
}

0 commit comments

Comments
 (0)