cargo fmt
This commit is contained in:
@@ -66,10 +66,9 @@ impl ThumbnailResponse {
|
||||
/// ```
|
||||
pub fn decode(&self) -> Result<image::DynamicImage> {
|
||||
// Get image format from content type
|
||||
let format = image::ImageFormat::from_mime_type(&self.content_type)
|
||||
.ok_or_else(|| ImmichError::Image(
|
||||
format!("Unsupported content type: {}", self.content_type)
|
||||
))?;
|
||||
let format = image::ImageFormat::from_mime_type(&self.content_type).ok_or_else(|| {
|
||||
ImmichError::Image(format!("Unsupported content type: {}", self.content_type))
|
||||
})?;
|
||||
|
||||
// Create reader with the format and decode
|
||||
image::ImageReader::with_format(Cursor::new(&self.data), format)
|
||||
|
||||
Reference in New Issue
Block a user