chore (backend-rs): address deprecation warning
This commit is contained in:
parent
72ab568a6a
commit
65ce0d5221
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
use crate::{database::cache, util::http_client};
|
||||
use image::{io::Reader, ImageError, ImageFormat};
|
||||
use image::{ImageReader, ImageError, ImageFormat};
|
||||
use isahc::AsyncReadResponseExt;
|
||||
use nom_exif::{parse_jpeg_exif, EntryValue, ExifTag};
|
||||
use std::io::Cursor;
|
||||
|
@ -87,7 +87,7 @@ pub async fn get_image_size_from_url(url: &str) -> Result<ImageSize, Error> {
|
|||
|
||||
let image_bytes = response.bytes().await?;
|
||||
|
||||
let reader = Reader::new(Cursor::new(&image_bytes)).with_guessed_format()?;
|
||||
let reader = ImageReader::new(Cursor::new(&image_bytes)).with_guessed_format()?;
|
||||
|
||||
let format = reader.format();
|
||||
if format.is_none() || !BROWSER_SAFE_IMAGE_TYPES.contains(&format.unwrap()) {
|
||||
|
|
Loading…
Reference in a new issue