Fix deprecation warnings
This commit is contained in:
parent
e7f8bc5766
commit
43853c8fda
1 changed files with 3 additions and 3 deletions
|
|
@ -19,7 +19,7 @@ use std::{
|
||||||
};
|
};
|
||||||
|
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
use image::{ImageFormat, RgbaImage};
|
use image::{ImageFormat, ImageReader, RgbaImage};
|
||||||
use mark::{
|
use mark::{
|
||||||
bw,
|
bw,
|
||||||
dither::{
|
dither::{
|
||||||
|
|
@ -252,7 +252,7 @@ struct Args {
|
||||||
fn load_image(r#in: &Option<PathBuf>) -> RgbaImage {
|
fn load_image(r#in: &Option<PathBuf>) -> RgbaImage {
|
||||||
if let Some(path) = r#in {
|
if let Some(path) = r#in {
|
||||||
eprintln!("Loading image from {}", path.display());
|
eprintln!("Loading image from {}", path.display());
|
||||||
image::io::Reader::open(path)
|
ImageReader::open(path)
|
||||||
.expect("failed to load image from file")
|
.expect("failed to load image from file")
|
||||||
.decode()
|
.decode()
|
||||||
.expect("failed to decode image data")
|
.expect("failed to decode image data")
|
||||||
|
|
@ -262,7 +262,7 @@ fn load_image(r#in: &Option<PathBuf>) -> RgbaImage {
|
||||||
std::io::stdin()
|
std::io::stdin()
|
||||||
.read_to_end(&mut buf)
|
.read_to_end(&mut buf)
|
||||||
.expect("failed to read stdin");
|
.expect("failed to read stdin");
|
||||||
image::io::Reader::new(Cursor::new(buf))
|
ImageReader::new(Cursor::new(buf))
|
||||||
.with_guessed_format()
|
.with_guessed_format()
|
||||||
.expect("failed to guess image format")
|
.expect("failed to guess image format")
|
||||||
.decode()
|
.decode()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue