From b8159cb14a3f6b063bf0013cc3d94a348652d05e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 15 Apr 2022 11:26:00 +0100 Subject: [PATCH] Make OccultIlkName a type alias, not a newtype There's not really an abstraction here defending anything, and it lacks constructors etc. Just abolish it. Signed-off-by: Ian Jackson --- src/occultilks.rs | 5 +---- src/shapelib.rs | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/occultilks.rs b/src/occultilks.rs index 0c63c53c..f9d6ccd7 100644 --- a/src/occultilks.rs +++ b/src/occultilks.rs @@ -11,10 +11,7 @@ slotmap::new_key_type!{ pub struct OccultIlkId; } #[serde(transparent)] pub struct OccultIlkOwningId(Id); -#[derive(Debug,Clone,Eq,PartialEq,Ord,PartialOrd,Hash)] -#[derive(Serialize,Deserialize)] -#[serde(transparent)] -pub struct OccultIlkName(pub Arc); +pub type OccultIlkName = Arc; #[derive(Debug,Serialize,Deserialize)] pub struct OccultIlkData { diff --git a/src/shapelib.rs b/src/shapelib.rs index c7e7c780..a4242278 100644 --- a/src/shapelib.rs +++ b/src/shapelib.rs @@ -602,7 +602,7 @@ impl Contents { desc: occ.desc.clone(), outline: occ.outline.clone(), }) as Arc; - Some((OccultIlkName(occ_name.into_inner()), it)) + Some((occ_name.into_inner(), it)) }, }; -- 2.30.2