From 64820876dfae169622fe42902f613434621dc875 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 31 May 2021 00:46:43 +0100 Subject: [PATCH] sshkeys: Provide more traits for our types Signed-off-by: Ian Jackson --- src/sshkeys.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sshkeys.rs b/src/sshkeys.rs index 53924564..cc1069b8 100644 --- a/src/sshkeys.rs +++ b/src/sshkeys.rs @@ -13,7 +13,8 @@ static RESTRICTIONS: &str = static MAGIC_BANNER: &str = "# WARNING - AUTOMATICALLY GENERAED FILE - DO NOT EDIT\n"; -#[derive(Copy,Clone,Serialize,Deserialize,Eq,PartialEq)] +#[derive(Copy,Clone,Serialize,Deserialize)] +#[derive(Eq,PartialEq,Hash,Ord,PartialOrd)] #[serde(transparent)] // This will detecte if the slotmap in Accounts gets rewound, without // updating the authorzed keys. That might reuse Id values but it @@ -67,6 +68,7 @@ pub struct ScopeKey { } #[derive(Debug,Clone,Serialize,Deserialize)] +#[derive(Eq,PartialEq,Hash,Ord,PartialOrd)] pub struct KeySpec { pub id: sshkeys::Id, pub nonce: sshkeys::Nonce, -- 2.30.2