From 43853c8fda537af4407526426154d3bd5dd4f37b Mon Sep 17 00:00:00 2001 From: Joscha Date: Sun, 1 Dec 2024 22:17:17 +0100 Subject: [PATCH] Fix deprecation warnings --- mark-bin/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mark-bin/src/main.rs b/mark-bin/src/main.rs index 1d98241..f6ce4f1 100644 --- a/mark-bin/src/main.rs +++ b/mark-bin/src/main.rs @@ -19,7 +19,7 @@ use std::{ }; use clap::Parser; -use image::{ImageFormat, RgbaImage}; +use image::{ImageFormat, ImageReader, RgbaImage}; use mark::{ bw, dither::{ @@ -252,7 +252,7 @@ struct Args { fn load_image(r#in: &Option) -> RgbaImage { if let Some(path) = r#in { eprintln!("Loading image from {}", path.display()); - image::io::Reader::open(path) + ImageReader::open(path) .expect("failed to load image from file") .decode() .expect("failed to decode image data") @@ -262,7 +262,7 @@ fn load_image(r#in: &Option) -> RgbaImage { std::io::stdin() .read_to_end(&mut buf) .expect("failed to read stdin"); - image::io::Reader::new(Cursor::new(buf)) + ImageReader::new(Cursor::new(buf)) .with_guessed_format() .expect("failed to guess image format") .decode()