From 9e5cf42139785dcddcee8a31a4f03756511c4d8d Mon Sep 17 00:00:00 2001 From: Matt Keeter Date: Mon, 30 Sep 2024 13:15:28 -0400 Subject: [PATCH] Remove unused `#[derive(..)]` (#1483) This is a quick audit of unused derives; removing them makes it obvious that types are not sent over the network or serialized. --- upstairs/src/lib.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/upstairs/src/lib.rs b/upstairs/src/lib.rs index c31a7e699..c77988fc9 100644 --- a/upstairs/src/lib.rs +++ b/upstairs/src/lib.rs @@ -382,8 +382,7 @@ mod cdt { } /// Array of data associated with three clients, indexed by `ClientId` -#[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema)] -#[serde(transparent)] +#[derive(Copy, Clone, Debug, Serialize, Deserialize)] pub struct ClientData([T; 3]); impl std::ops::Index for ClientData { @@ -439,8 +438,7 @@ impl ClientData { } /// Map of data associated with clients, keyed by `ClientId` -#[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema)] -#[serde(transparent)] +#[derive(Copy, Clone, Debug)] pub struct ClientMap(ClientData>); impl ClientMap { @@ -1369,7 +1367,7 @@ impl IOop { } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)] +#[derive(Debug, Clone, PartialEq)] pub enum ReconcileIOState { // A new IO request. New, @@ -1388,7 +1386,7 @@ pub enum ReconcileIOState { * they operate independent of each other. */ #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)] +#[derive(Debug, Clone, PartialEq)] pub enum IOState { /// The request has been sent to this tasks downstairs. InProgress,