From b062f0a19f5e4e24eee4095351f217b0f9f4955d Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Thu, 22 Feb 2018 13:16:33 +0000 Subject: [PATCH] EpisodeWidget Machine: Remove unused From impls. --- hammond-gtk/src/widgets/episode_states.rs | 56 ++--------------------- 1 file changed, 4 insertions(+), 52 deletions(-) diff --git a/hammond-gtk/src/widgets/episode_states.rs b/hammond-gtk/src/widgets/episode_states.rs index 3673592..ccca899 100644 --- a/hammond-gtk/src/widgets/episode_states.rs +++ b/hammond-gtk/src/widgets/episode_states.rs @@ -50,47 +50,11 @@ pub trait Visibility {} impl Visibility for Shown {} impl Visibility for Hidden {} -impl From for Shown { - fn from(_: Hidden) -> Self { - Shown {} - } -} - -impl From for Hidden { - fn from(_: Shown) -> Self { - Hidden {} - } -} - -impl Into for UnInitialized { - fn into(self) -> Hidden { - Hidden {} - } -} - -impl Into for UnInitialized { - fn into(self) -> Shown { - Shown {} - } -} - #[derive(Debug, Clone)] pub struct Normal; #[derive(Debug, Clone)] pub struct GreyedOut; -impl From for GreyedOut { - fn from(_: Normal) -> Self { - GreyedOut {} - } -} - -impl From for Normal { - fn from(_: GreyedOut) -> Self { - Normal {} - } -} - #[derive(Debug, Clone)] pub struct Title { title: gtk::Label, @@ -123,7 +87,7 @@ impl From> for Title { Title { title: f.title, - state: f.state.into(), + state: GreyedOut {}, } } } @@ -136,7 +100,7 @@ impl From> for Title { Title { title: f.title, - state: f.state.into(), + state: Normal {}, } } } @@ -179,18 +143,6 @@ pub struct Usual; #[derive(Debug, Clone)] pub struct YearShown; -impl From for YearShown { - fn from(_: Usual) -> Self { - YearShown {} - } -} - -impl From for Usual { - fn from(_: YearShown) -> Self { - Usual {} - } -} - #[derive(Debug, Clone)] pub struct Date { date: gtk::Label, @@ -305,7 +257,7 @@ impl From> for Duration { Duration { duration: f.duration, separator: f.separator, - state: f.state.into(), + state: Shown {}, } } } @@ -318,7 +270,7 @@ impl From> for Duration { Duration { duration: f.duration, separator: f.separator, - state: f.state.into(), + state: Hidden {}, } } }