SaInfo, CVE: add derive Eq, PartialEq, Hash

Signed-off-by: Jia Chao <jiac13@chinaunicom.cn>
This commit is contained in:
Jia Chao 2024-06-19 15:23:12 +08:00
parent 5403c5a6d6
commit 772770911b

View File

@ -1043,7 +1043,7 @@ impl Threat {
} }
} }
#[derive(Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Serialize, Deserialize)] #[derive(Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Severity { pub enum Severity {
Null, Null,
Low, Low,
@ -1206,7 +1206,7 @@ impl Remediation {
} }
} }
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Eq, PartialEq, Hash, Serialize, Deserialize)]
pub struct SaInfo { pub struct SaInfo {
// sa id // sa id
pub id: String, pub id: String,
@ -1226,7 +1226,7 @@ pub struct SaInfo {
pub cves: Vec<CVE>, pub cves: Vec<CVE>,
} }
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Eq, PartialEq, Hash, Serialize, Deserialize)]
pub struct CVE { pub struct CVE {
// cve id // cve id
pub id: String, pub id: String,