From 006be1f406314781f8e12f0c0e2967546a465c3e Mon Sep 17 00:00:00 2001 From: kennethloeffler Date: Mon, 11 Nov 2024 19:53:08 +0000 Subject: [PATCH] Fix EnumItem not respecting serde feature in field rename --- rbx_types/src/basic_types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rbx_types/src/basic_types.rs b/rbx_types/src/basic_types.rs index 174a431e..fb412dfe 100644 --- a/rbx_types/src/basic_types.rs +++ b/rbx_types/src/basic_types.rs @@ -36,7 +36,7 @@ impl Enum { #[derive(Debug, Clone, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize,))] pub struct EnumItem { - #[serde(rename = "type")] + #[cfg_attr(feature = "serde", serde(rename = "type"))] pub ty: String, pub value: u32, }