Skip to content

Commit

Permalink
fix typo in bevy_reflect::impls::std GetTypeRegistration for vec like… (
Browse files Browse the repository at this point in the history
#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.
  • Loading branch information
Catddly committed Feb 6, 2023
1 parent dcc0372 commit 4fd092f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/bevy_reflect/src/impls/std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 4fd092f

Please sign in to comment.