diff --git a/src/line.rs b/src/line.rs index 8923f44..771e243 100644 --- a/src/line.rs +++ b/src/line.rs @@ -79,14 +79,14 @@ impl DerefMut for Lines { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.0 } } -#[derive(Debug, PartialEq, Eq)] +#[derive(Debug, Clone, PartialEq)] pub enum Line { Tag(Tag), Uri(String), } #[allow(clippy::large_enum_variant)] -#[derive(Debug, Clone, PartialEq, Eq)] +#[derive(Debug, Clone, PartialEq)] pub enum Tag { ExtM3u(tags::ExtM3u), ExtXVersion(tags::ExtXVersion), diff --git a/src/tags/master_playlist/stream_inf.rs b/src/tags/master_playlist/stream_inf.rs index 33cf5c5..a273d61 100644 --- a/src/tags/master_playlist/stream_inf.rs +++ b/src/tags/master_playlist/stream_inf.rs @@ -21,7 +21,7 @@ use crate::{Error, RequiredVersion}; /// Renditions SHOULD play this Rendition. /// /// [4.3.4.2. EXT-X-STREAM-INF]: https://tools.ietf.org/html/rfc8216#section-4.3.4.2 -#[derive(PartialOrd, Debug, Clone, PartialEq, Eq)] +#[derive(PartialOrd, Debug, Clone, PartialEq)] pub struct ExtXStreamInf { uri: String, frame_rate: Option, diff --git a/src/tags/shared/start.rs b/src/tags/shared/start.rs index a69d8b1..54d897a 100644 --- a/src/tags/shared/start.rs +++ b/src/tags/shared/start.rs @@ -9,7 +9,7 @@ use crate::{Error, RequiredVersion}; /// [4.3.5.2. EXT-X-START] /// /// [4.3.5.2. EXT-X-START]: https://tools.ietf.org/html/rfc8216#section-4.3.5.2 -#[derive(PartialOrd, Debug, Clone, Copy, PartialEq, Eq)] +#[derive(PartialOrd, Debug, Clone, Copy, PartialEq)] pub struct ExtXStart { time_offset: SignedDecimalFloatingPoint, precise: bool, diff --git a/src/types/decimal_floating_point.rs b/src/types/decimal_floating_point.rs index 8ab8b20..f12d5c4 100644 --- a/src/types/decimal_floating_point.rs +++ b/src/types/decimal_floating_point.rs @@ -35,8 +35,6 @@ impl DecimalFloatingPoint { pub const fn as_f64(self) -> f64 { self.0 } } -impl Eq for DecimalFloatingPoint {} - // this trait is implemented manually, so it doesn't construct a // [`DecimalFloatingPoint`], with a negative value. impl FromStr for DecimalFloatingPoint { diff --git a/src/types/key_format.rs b/src/types/key_format.rs index d1268a4..5b534ff 100644 --- a/src/types/key_format.rs +++ b/src/types/key_format.rs @@ -31,6 +31,7 @@ impl fmt::Display for KeyFormat { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", quote("identity")) } } +/// This tag requires [`ProtocolVersion::V5`]. impl RequiredVersion for KeyFormat { fn required_version(&self) -> ProtocolVersion { ProtocolVersion::V5 } } diff --git a/src/types/key_format_versions.rs b/src/types/key_format_versions.rs index 4c33031..16537a9 100644 --- a/src/types/key_format_versions.rs +++ b/src/types/key_format_versions.rs @@ -15,10 +15,6 @@ use crate::RequiredVersion; #[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)] pub struct KeyFormatVersions(Vec); -impl Default for KeyFormatVersions { - fn default() -> Self { Self(vec![1]) } -} - impl KeyFormatVersions { /// Makes a new [`KeyFormatVersions`]. pub fn new() -> Self { Self::default() } @@ -37,6 +33,10 @@ impl KeyFormatVersions { pub fn is_default(&self) -> bool { self.0 == vec![1] && self.0.len() == 1 || self.0.is_empty() } } +impl Default for KeyFormatVersions { + fn default() -> Self { Self(vec![1]) } +} + impl Deref for KeyFormatVersions { type Target = Vec; @@ -47,6 +47,7 @@ impl DerefMut for KeyFormatVersions { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.0 } } +/// This tag requires [`ProtocolVersion::V5`]. impl RequiredVersion for KeyFormatVersions { fn required_version(&self) -> ProtocolVersion { ProtocolVersion::V5 } } diff --git a/src/types/signed_decimal_floating_point.rs b/src/types/signed_decimal_floating_point.rs index 541503b..63e9b80 100644 --- a/src/types/signed_decimal_floating_point.rs +++ b/src/types/signed_decimal_floating_point.rs @@ -33,8 +33,6 @@ impl Deref for SignedDecimalFloatingPoint { fn deref(&self) -> &Self::Target { &self.0 } } -impl Eq for SignedDecimalFloatingPoint {} - #[cfg(test)] mod tests { use super::*;