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.
This commit is contained in:
CrystaLamb 2023-02-06 12:58:21 +00:00
parent dcc03724a5
commit 4fd092fbec

View file

@ -317,8 +317,8 @@ macro_rules! impl_reflect_for_veclike {
impl<T: FromReflect> GetTypeRegistration for $ty {
fn get_type_registration() -> TypeRegistration {
let mut registration = TypeRegistration::of::<Vec<T>>();
registration.insert::<ReflectFromPtr>(FromType::<Vec<T>>::from_type());
let mut registration = TypeRegistration::of::<$ty>();
registration.insert::<ReflectFromPtr>(FromType::<$ty>::from_type());
registration
}
}