EpisodeWidget Machine: Remove unused From impls.

This commit is contained in:
Jordan Petridis 2018-02-22 13:16:33 +00:00
parent 2a6e0b0e07
commit b062f0a19f
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6

View File

@ -50,47 +50,11 @@ pub trait Visibility {}
impl Visibility for Shown {}
impl Visibility for Hidden {}
impl From<Hidden> for Shown {
fn from(_: Hidden) -> Self {
Shown {}
}
}
impl From<Shown> for Hidden {
fn from(_: Shown) -> Self {
Hidden {}
}
}
impl Into<Hidden> for UnInitialized {
fn into(self) -> Hidden {
Hidden {}
}
}
impl Into<Shown> for UnInitialized {
fn into(self) -> Shown {
Shown {}
}
}
#[derive(Debug, Clone)]
pub struct Normal;
#[derive(Debug, Clone)]
pub struct GreyedOut;
impl From<Normal> for GreyedOut {
fn from(_: Normal) -> Self {
GreyedOut {}
}
}
impl From<GreyedOut> for Normal {
fn from(_: GreyedOut) -> Self {
Normal {}
}
}
#[derive(Debug, Clone)]
pub struct Title<S> {
title: gtk::Label,
@ -123,7 +87,7 @@ impl From<Title<Normal>> for Title<GreyedOut> {
Title {
title: f.title,
state: f.state.into(),
state: GreyedOut {},
}
}
}
@ -136,7 +100,7 @@ impl From<Title<GreyedOut>> for Title<Normal> {
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<Usual> for YearShown {
fn from(_: Usual) -> Self {
YearShown {}
}
}
impl From<YearShown> for Usual {
fn from(_: YearShown) -> Self {
Usual {}
}
}
#[derive(Debug, Clone)]
pub struct Date<S> {
date: gtk::Label,
@ -305,7 +257,7 @@ impl From<Duration<Hidden>> for Duration<Shown> {
Duration {
duration: f.duration,
separator: f.separator,
state: f.state.into(),
state: Shown {},
}
}
}
@ -318,7 +270,7 @@ impl From<Duration<Shown>> for Duration<Hidden> {
Duration {
duration: f.duration,
separator: f.separator,
state: f.state.into(),
state: Hidden {},
}
}
}