From: Ian Jackson Date: Sun, 30 May 2021 23:46:43 +0000 (+0100) Subject: sshkeys: Provide more traits for our types X-Git-Tag: otter-0.7.0~177 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=64820876dfae169622fe42902f613434621dc875;p=otter.git sshkeys: Provide more traits for our types Signed-off-by: Ian Jackson --- 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,