aboutsummaryrefslogtreecommitdiff
path: root/src/sound.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sound.rs')
-rw-r--r--src/sound.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sound.rs b/src/sound.rs
index f4123e10..e184d02c 100644
--- a/src/sound.rs
+++ b/src/sound.rs
@@ -40,9 +40,10 @@ fn play_bytes(data: &[u8]) -> Result<(), String> {
Command::new("afplay").arg(&tmp).output()
} else {
// Try paplay (PulseAudio) first, fall back to aplay (ALSA)
- Command::new("paplay").arg(&tmp).output().or_else(|_| {
- Command::new("aplay").arg(&tmp).output()
- })
+ Command::new("paplay")
+ .arg(&tmp)
+ .output()
+ .or_else(|_| Command::new("aplay").arg(&tmp).output())
};
let _ = std::fs::remove_file(&tmp);