From e2089108da7ba5de979154a75dc660ac960c8f3b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 2 Apr 2021 16:35:32 +0100 Subject: [PATCH] OldNew: Make it Serialize and Deserialize Signed-off-by: Ian Jackson --- src/utils.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils.rs b/src/utils.rs index a72a7905..a66cf789 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -40,7 +40,8 @@ impl str { } #[derive(Copy,Clone,Debug,From,Into)] -#[derive(Hash,Eq,PartialEq)] +#[derive(Hash,Eq,PartialEq,Serialize,Deserialize)] +#[serde(transparent)] pub struct OldNew([T; 2]); #[derive(Copy,Clone,Debug)] -- 2.30.2