From e4b4a3d198a5004b7b4b26dbb7e780a7ffc2bf02 Mon Sep 17 00:00:00 2001 From: arabian Date: Fri, 2 Jan 2026 03:59:56 +0300 Subject: [PATCH] fix: remove unnecessary mutability in audio player lock --- src/types/commands.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/commands.rs b/src/types/commands.rs index 527b84a..82c4075 100644 --- a/src/types/commands.rs +++ b/src/types/commands.rs @@ -123,7 +123,7 @@ impl Executable for IsPausedCommand { #[async_trait] impl Executable for GetStateCommand { async fn execute(&self) -> Response { - let mut audio_player = get_audio_player().await.lock().await; + let audio_player = get_audio_player().await.lock().await; let state = audio_player.get_state(); Response::new(true, serde_json::to_string(&state).unwrap()) } @@ -154,7 +154,7 @@ impl Executable for SetVolumeCommand { #[async_trait] impl Executable for GetPositionCommand { async fn execute(&self) -> Response { - let mut audio_player = get_audio_player().await.lock().await; + let audio_player = get_audio_player().await.lock().await; let position = audio_player.get_position(); Response::new(true, position.to_string()) }