From 4fd1a7281260984557cc517ae3220aacec133775 Mon Sep 17 00:00:00 2001 From: "Sikkema, Isaac" Date: Mon, 19 Jun 2023 11:28:28 -0400 Subject: [PATCH] Fix optional definition of FieldData --- src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index c43895e..61e007a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -302,8 +302,7 @@ impl Clone for CalibData { /// Contains read sensors values e.g. temperature, pressure, humidity etc. #[derive(Debug, Default, Copy)] -#[cfg(feature = "serde")] -#[derive(Serialize, Deserialize)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[repr(C)] pub struct FieldData { /// Contains new_data, gasm_valid & heat_stab