EpisodeWidget Machine: Remove unused From impls.
This commit is contained in:
parent
2a6e0b0e07
commit
b062f0a19f
@ -50,47 +50,11 @@ pub trait Visibility {}
|
|||||||
impl Visibility for Shown {}
|
impl Visibility for Shown {}
|
||||||
impl Visibility for Hidden {}
|
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)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Normal;
|
pub struct Normal;
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct GreyedOut;
|
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)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Title<S> {
|
pub struct Title<S> {
|
||||||
title: gtk::Label,
|
title: gtk::Label,
|
||||||
@ -123,7 +87,7 @@ impl From<Title<Normal>> for Title<GreyedOut> {
|
|||||||
|
|
||||||
Title {
|
Title {
|
||||||
title: f.title,
|
title: f.title,
|
||||||
state: f.state.into(),
|
state: GreyedOut {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -136,7 +100,7 @@ impl From<Title<GreyedOut>> for Title<Normal> {
|
|||||||
|
|
||||||
Title {
|
Title {
|
||||||
title: f.title,
|
title: f.title,
|
||||||
state: f.state.into(),
|
state: Normal {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -179,18 +143,6 @@ pub struct Usual;
|
|||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct YearShown;
|
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)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Date<S> {
|
pub struct Date<S> {
|
||||||
date: gtk::Label,
|
date: gtk::Label,
|
||||||
@ -305,7 +257,7 @@ impl From<Duration<Hidden>> for Duration<Shown> {
|
|||||||
Duration {
|
Duration {
|
||||||
duration: f.duration,
|
duration: f.duration,
|
||||||
separator: f.separator,
|
separator: f.separator,
|
||||||
state: f.state.into(),
|
state: Shown {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -318,7 +270,7 @@ impl From<Duration<Shown>> for Duration<Hidden> {
|
|||||||
Duration {
|
Duration {
|
||||||
duration: f.duration,
|
duration: f.duration,
|
||||||
separator: f.separator,
|
separator: f.separator,
|
||||||
state: f.state.into(),
|
state: Hidden {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user