mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-04-28 06:21:23 +00:00
fix: remove unnecessary mutability in audio player lock
This commit is contained in:
@@ -123,7 +123,7 @@ impl Executable for IsPausedCommand {
|
|||||||
#[async_trait]
|
#[async_trait]
|
||||||
impl Executable for GetStateCommand {
|
impl Executable for GetStateCommand {
|
||||||
async fn execute(&self) -> Response {
|
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();
|
let state = audio_player.get_state();
|
||||||
Response::new(true, serde_json::to_string(&state).unwrap())
|
Response::new(true, serde_json::to_string(&state).unwrap())
|
||||||
}
|
}
|
||||||
@@ -154,7 +154,7 @@ impl Executable for SetVolumeCommand {
|
|||||||
#[async_trait]
|
#[async_trait]
|
||||||
impl Executable for GetPositionCommand {
|
impl Executable for GetPositionCommand {
|
||||||
async fn execute(&self) -> Response {
|
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();
|
let position = audio_player.get_position();
|
||||||
Response::new(true, position.to_string())
|
Response::new(true, position.to_string())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user