From b77f0a18cef0c893cb48d2b34746287c7c00cdc6 Mon Sep 17 00:00:00 2001 From: johannesd3 Date: Sat, 13 Feb 2021 10:29:00 +0100 Subject: [PATCH] Fix formatting --- core/src/connection/mod.rs | 2 +- playback/src/player.rs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/src/connection/mod.rs b/core/src/connection/mod.rs index 1ca7316..68e2e7a 100644 --- a/core/src/connection/mod.rs +++ b/core/src/connection/mod.rs @@ -32,7 +32,7 @@ pub async fn connect(addr: String, proxy: &Option) -> io::Result .map_err(|e| { io::Error::new(io::ErrorKind::InvalidInput, format!("Invalid port: {}", e)) })?; - + let host = split .next() .ok_or_else(|| io::Error::new(io::ErrorKind::InvalidInput, "Missing port"))?; diff --git a/playback/src/player.rs b/playback/src/player.rs index 26eea7f..6f6a85a 100644 --- a/playback/src/player.rs +++ b/playback/src/player.rs @@ -329,7 +329,10 @@ impl Player { pub async fn get_end_of_track_future(&self) { let mut channel = self.get_player_event_channel(); while let Some(event) = channel.next().await { - if matches!(event, PlayerEvent::EndOfTrack { .. } | PlayerEvent::Stopped { .. }) { + if matches!( + event, + PlayerEvent::EndOfTrack { .. } | PlayerEvent::Stopped { .. } + ) { return; } } @@ -701,7 +704,7 @@ impl PlayerTrackLoader { // we need to seek -> we set stream mode after the initial seek. stream_loader_controller.set_random_access_mode(); } - + let key = match self.session.audio_key().request(spotify_id, file_id).await { Ok(key) => key, Err(_) => {