Skip to content

Commit 9e5cf42

Browse files
authored
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.
1 parent eed6e87 commit 9e5cf42

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

upstairs/src/lib.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,7 @@ mod cdt {
382382
}
383383

384384
/// Array of data associated with three clients, indexed by `ClientId`
385-
#[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema)]
386-
#[serde(transparent)]
385+
#[derive(Copy, Clone, Debug, Serialize, Deserialize)]
387386
pub struct ClientData<T>([T; 3]);
388387

389388
impl<T> std::ops::Index<ClientId> for ClientData<T> {
@@ -439,8 +438,7 @@ impl<T> ClientData<T> {
439438
}
440439

441440
/// Map of data associated with clients, keyed by `ClientId`
442-
#[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema)]
443-
#[serde(transparent)]
441+
#[derive(Copy, Clone, Debug)]
444442
pub struct ClientMap<T>(ClientData<Option<T>>);
445443

446444
impl<T> ClientMap<T> {
@@ -1369,7 +1367,7 @@ impl IOop {
13691367
}
13701368

13711369
#[allow(clippy::derive_partial_eq_without_eq)]
1372-
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
1370+
#[derive(Debug, Clone, PartialEq)]
13731371
pub enum ReconcileIOState {
13741372
// A new IO request.
13751373
New,
@@ -1388,7 +1386,7 @@ pub enum ReconcileIOState {
13881386
* they operate independent of each other.
13891387
*/
13901388
#[allow(clippy::derive_partial_eq_without_eq)]
1391-
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
1389+
#[derive(Debug, Clone, PartialEq)]
13921390
pub enum IOState {
13931391
/// The request has been sent to this tasks downstairs.
13941392
InProgress,

0 commit comments

Comments
 (0)