mirror of
https://github.com/figsoda/mmtc
synced 2024-11-22 07:03:05 +00:00
replace if let with map_or
This commit is contained in:
parent
bba751e034
commit
46d2ddc992
1 changed files with 1 additions and 5 deletions
|
@ -353,11 +353,7 @@ async fn run() -> Result<()> {
|
|||
Command::ToggleOneshot => {
|
||||
mpd::command(
|
||||
&mut cl,
|
||||
if status.single == None {
|
||||
b"single 0\n"
|
||||
} else {
|
||||
b"single oneshot\n"
|
||||
},
|
||||
status.single.map_or(b"single 0\n", |_| b"single oneshot\n"),
|
||||
)
|
||||
.await
|
||||
.context("Failed to toggle oneshot")?;
|
||||
|
|
Loading…
Reference in a new issue