From 4fd092fbec07416fa9b1e2306f61231ae20315ac Mon Sep 17 00:00:00 2001 From: CrystaLamb Date: Mon, 6 Feb 2023 12:58:21 +0000 Subject: [PATCH] =?UTF-8?q?fix=20typo=20in=20bevy=5Freflect::impls::std=20?= =?UTF-8?q?GetTypeRegistration=20for=20vec=20like=E2=80=A6=20(#7520)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implementing GetTypeRegistration in macro impl_reflect_for_veclike! had typos! It only implement GetTypeRegistration for Vec, but not for VecDeque. This will cause serialization and deserialization failure. --- crates/bevy_reflect/src/impls/std.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_reflect/src/impls/std.rs b/crates/bevy_reflect/src/impls/std.rs index 7e53a46a7ac53..4555447255bc7 100644 --- a/crates/bevy_reflect/src/impls/std.rs +++ b/crates/bevy_reflect/src/impls/std.rs @@ -317,8 +317,8 @@ macro_rules! impl_reflect_for_veclike { impl GetTypeRegistration for $ty { fn get_type_registration() -> TypeRegistration { - let mut registration = TypeRegistration::of::>(); - registration.insert::(FromType::>::from_type()); + let mut registration = TypeRegistration::of::<$ty>(); + registration.insert::(FromType::<$ty>::from_type()); registration } }