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 {
// Convert Ok(_) to Ok(DynamicImage) which will never be used since the if statement
// covers it.
guessed_reader.map(|_| DynamicImage::default())
// Convert Ok(_) to Ok(DynamicImage) which will never be used
// since the if statement covers it.
guessed_reader.map(|_| -> DynamicImage { unreachable!() })
}
} else {
ImageReader::with_format(Cursor::new(image_ref), image_format)