diff --git a/television/channels/entry.rs b/television/channels/entry.rs index 9c6b274..541ca7b 100644 --- a/television/channels/entry.rs +++ b/television/channels/entry.rs @@ -24,6 +24,9 @@ pub struct Entry { impl Hash for Entry { fn hash(&self, state: &mut H) { self.raw.hash(state); + if let Some(display) = &self.display { + display.hash(state); + } if let Some(line_number) = self.line_number { line_number.hash(state); } @@ -35,6 +38,8 @@ impl PartialEq for &Entry { self.raw == other.raw && (self.line_number.is_none() && other.line_number.is_none() || self.line_number == other.line_number) + && (self.display.is_none() && other.display.is_none() + || self.display == other.display) } } @@ -43,6 +48,8 @@ impl PartialEq for Entry { self.raw == other.raw && (self.line_number.is_none() && other.line_number.is_none() || self.line_number == other.line_number) + && (self.display.is_none() && other.display.is_none() + || self.display == other.display) } } diff --git a/television/channels/prototypes.rs b/television/channels/prototypes.rs index 35ebf34..f44c823 100644 --- a/television/channels/prototypes.rs +++ b/television/channels/prototypes.rs @@ -348,11 +348,17 @@ pub struct PreviewSpec { pub command: CommandSpec, #[serde(default)] pub offset: Option