From eed8af3a374da384c444e55b624e2bdd30c05b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=82=8E=E6=B3=BC?= Date: Sat, 30 Nov 2024 14:49:42 +0800 Subject: [PATCH] Refactor: reference the feature flag of the openraft crate --- openraft/src/raft/declare_raft_types_test.rs | 2 ++ openraft/src/raft/mod.rs | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/openraft/src/raft/declare_raft_types_test.rs b/openraft/src/raft/declare_raft_types_test.rs index 2f575a10f..fa13ff6b3 100644 --- a/openraft/src/raft/declare_raft_types_test.rs +++ b/openraft/src/raft/declare_raft_types_test.rs @@ -1,5 +1,7 @@ //! Test the `declare_raft_types` macro with default values +#![allow(dead_code)] + use std::io::Cursor; use crate::declare_raft_types; diff --git a/openraft/src/raft/mod.rs b/openraft/src/raft/mod.rs index 99a5c3ba0..05ec57607 100644 --- a/openraft/src/raft/mod.rs +++ b/openraft/src/raft/mod.rs @@ -156,7 +156,6 @@ macro_rules! declare_raft_types { ($(#[$outer:meta])* $visibility:vis $id:ident: $($(#[$inner:meta])* $type_id:ident = $type:ty),* $(,)? ) => { $(#[$outer])* #[derive(Debug, Clone, Copy, Default, Eq, PartialEq, Ord, PartialOrd)] - #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] $visibility struct $id {} impl $crate::RaftTypeConfig for $id {