From 0bae67e931006c62d3997573926f42ca4e178e03 Mon Sep 17 00:00:00 2001 From: nils <48135649+Nilstrieb@users.noreply.github.com> Date: Tue, 18 Apr 2023 12:21:11 +0200 Subject: [PATCH] more --- src/tiles.rs | 14 ++++++-------- tiles.rs | 14 ++++++-------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/tiles.rs b/src/tiles.rs index 70d0861..beb5042 100644 --- a/src/tiles.rs +++ b/src/tiles.rs @@ -43,12 +43,11 @@ impl TileLayer for Fg { } #[derive(Serialize, Deserialize, Inspect)] -pub struct TileDef +pub struct TileDef where - Layer::SpecificDef: Debug + Inspect, { /// Whether the tile emits light, and the light source offset - pub layer: Layer::SpecificDef, + pub layer: ::SpecificDef, //ADD pub blend_graphic: String, } @@ -60,18 +59,16 @@ pub struct MidDef { pub bb: Option, } -impl Debug for TileDef +impl Debug for TileDef where - Layer::SpecificDef: Debug + Inspect, { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { loop {} } } -impl Default for TileDef +impl Default for TileDef<> where - Layer::SpecificDef: Default + Debug + Inspect, { fn default() -> Self { loop {} @@ -86,7 +83,8 @@ pub struct TileBb { pub h: u8, } +// this is actually used #[derive(Serialize, Deserialize, Debug, Inspect)] pub struct TileDb { - unknown_bg: TileDef, + unknown_bg: TileDef, } diff --git a/tiles.rs b/tiles.rs index 70d0861..beb5042 100644 --- a/tiles.rs +++ b/tiles.rs @@ -43,12 +43,11 @@ impl TileLayer for Fg { } #[derive(Serialize, Deserialize, Inspect)] -pub struct TileDef +pub struct TileDef where - Layer::SpecificDef: Debug + Inspect, { /// Whether the tile emits light, and the light source offset - pub layer: Layer::SpecificDef, + pub layer: ::SpecificDef, //ADD pub blend_graphic: String, } @@ -60,18 +59,16 @@ pub struct MidDef { pub bb: Option, } -impl Debug for TileDef +impl Debug for TileDef where - Layer::SpecificDef: Debug + Inspect, { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { loop {} } } -impl Default for TileDef +impl Default for TileDef<> where - Layer::SpecificDef: Default + Debug + Inspect, { fn default() -> Self { loop {} @@ -86,7 +83,8 @@ pub struct TileBb { pub h: u8, } +// this is actually used #[derive(Serialize, Deserialize, Debug, Inspect)] pub struct TileDb { - unknown_bg: TileDef, + unknown_bg: TileDef, }