Fix warning and clippy lints

This commit is contained in:
Roderick van Domburg 2022-08-22 22:38:19 +02:00
parent 27e1274dcb
commit 9d80521e09
No known key found for this signature in database
GPG key ID: 87F5FDE8A56219F4
4 changed files with 6 additions and 6 deletions

View file

@ -87,10 +87,10 @@ impl SpotifyId {
/// Returns whether this `SpotifyId` is for a playable audio item, if known. /// Returns whether this `SpotifyId` is for a playable audio item, if known.
pub fn is_playable(&self) -> bool { pub fn is_playable(&self) -> bool {
return matches!( matches!(
self.item_type, self.item_type,
SpotifyItemType::Episode | SpotifyItemType::Track SpotifyItemType::Episode | SpotifyItemType::Track
); )
} }
/// Parses a base16 (hex) encoded [Spotify ID] into a `SpotifyId`. /// Parses a base16 (hex) encoded [Spotify ID] into a `SpotifyId`.

View file

@ -73,7 +73,7 @@ impl AudioFormat {
} }
} }
#[derive(Clone, Copy, Debug, PartialEq)] #[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum NormalisationType { pub enum NormalisationType {
Album, Album,
Track, Track,
@ -98,7 +98,7 @@ impl Default for NormalisationType {
} }
} }
#[derive(Clone, Copy, Debug, PartialEq)] #[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum NormalisationMethod { pub enum NormalisationMethod {
Basic, Basic,
Dynamic, Dynamic,

View file

@ -144,7 +144,7 @@ impl SymphoniaDecoder {
(time.seconds as f64 + time.frac) * 1000. (time.seconds as f64 + time.frac) * 1000.
} }
// Fallback in the unexpected case that the format has no base time set. // Fallback in the unexpected case that the format has no base time set.
None => (ts as f64 * PAGES_PER_MS), None => ts as f64 * PAGES_PER_MS,
}; };
seeked_to_ms as u32 seeked_to_ms as u32
} }

View file

@ -61,7 +61,7 @@ pub struct Player {
play_request_id_generator: SeqGenerator<u64>, play_request_id_generator: SeqGenerator<u64>,
} }
#[derive(PartialEq, Debug, Clone, Copy)] #[derive(PartialEq, Eq, Debug, Clone, Copy)]
pub enum SinkStatus { pub enum SinkStatus {
Running, Running,
Closed, Closed,