diff options
author | Matthias Beyer <matthias.beyer@ifm.com> | 2022-08-18 15:07:41 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@ifm.com> | 2022-08-18 15:40:40 +0200 |
commit | e9a7fc83edfda48c844455da068d170a9a9af947 (patch) | |
tree | b9b6995243499fcd31ab1329ad6457d648299730 | |
parent | 9faefbe919cc09d5763978daac9d15c492eebb55 (diff) |
Fix clippy: thin_edge_json: Add derive for Eq
This fixes clippy::derive_partial_eq_without_eq
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
-rw-r--r-- | crates/core/thin_edge_json/src/alarm.rs | 6 | ||||
-rw-r--r-- | crates/core/thin_edge_json/src/event.rs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/crates/core/thin_edge_json/src/alarm.rs b/crates/core/thin_edge_json/src/alarm.rs index 783fc355..948f892b 100644 --- a/crates/core/thin_edge_json/src/alarm.rs +++ b/crates/core/thin_edge_json/src/alarm.rs @@ -4,14 +4,14 @@ use clock::Timestamp; use serde::Deserialize; /// In-memory representation of ThinEdge JSON alarm. -#[derive(Debug, Deserialize, PartialEq)] +#[derive(Debug, Deserialize, Eq, PartialEq)] pub struct ThinEdgeAlarm { pub name: String, pub severity: AlarmSeverity, pub data: Option<ThinEdgeAlarmData>, } -#[derive(Debug, Deserialize, PartialEq)] +#[derive(Debug, Deserialize, Eq, PartialEq)] pub enum AlarmSeverity { Critical, Major, @@ -20,7 +20,7 @@ pub enum AlarmSeverity { } /// In-memory representation of ThinEdge JSON alarm payload -#[derive(Debug, Deserialize, PartialEq)] +#[derive(Debug, Deserialize, Eq, PartialEq)] pub struct ThinEdgeAlarmData { pub text: Option<String>, diff --git a/crates/core/thin_edge_json/src/event.rs b/crates/core/thin_edge_json/src/event.rs index 20052f0e..8d3950f5 100644 --- a/crates/core/thin_edge_json/src/event.rs +++ b/crates/core/thin_edge_json/src/event.rs @@ -7,7 +7,7 @@ use serde_json::Value; use self::error::ThinEdgeJsonDeserializerError; /// In-memory representation of ThinEdge JSON event. -#[derive(Debug, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Serialize, Deserialize, Eq, PartialEq)] pub struct ThinEdgeEvent { #[serde(rename = "type")] pub name: String, @@ -17,7 +17,7 @@ pub struct ThinEdgeEvent { } /// In-memory representation of ThinEdge JSON event payload -#[derive(Debug, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Serialize, Deserialize, Eq, PartialEq)] pub struct ThinEdgeEventData { pub text: Option<String>, |