Refactor handling of Result conversion

This commit is contained in:
Stephen Seo 2022-11-01 17:36:16 +09:00
parent a1fe8c3120
commit a9441536c4

View file

@ -411,9 +411,9 @@ impl MPDDisplay {
) )
}) })
} else { } else {
// Convert Ok(_) to Ok(DynamicImage) which will never be used since the if statement // Convert Ok(_) to Ok(DynamicImage) which will never be used
// covers it. // since the if statement covers it.
guessed_reader.map(|_| DynamicImage::default()) guessed_reader.map(|_| -> DynamicImage { unreachable!() })
} }
} else { } else {
ImageReader::with_format(Cursor::new(image_ref), image_format) ImageReader::with_format(Cursor::new(image_ref), image_format)