collapse else if block

This commit is contained in:
figsoda 2020-11-02 18:22:30 -05:00
parent 15175be091
commit 762207c1bc

View file

@ -92,8 +92,7 @@ pub async fn queue(cl: &mut Client) -> Result<Vec<Track>> {
expand!([@b"file: ", xs @ ..]) => {
if first {
first = false;
} else {
if let (Some(file), Some(time)) = (file, time) {
} else if let (Some(file), Some(time)) = (file, time) {
tracks.push(Track {
file,
artist,
@ -104,7 +103,6 @@ pub async fn queue(cl: &mut Client) -> Result<Vec<Track>> {
} else {
bail!("incomplete playlist response");
}
}
file = Some(String::from_utf8_lossy(xs).into());
artist = None;