From d173617ee23b179ed7e9926d124eaa41b855e071 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 18 Feb 2025 09:56:13 -0500 Subject: Update deps --- src/main.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index c139ee8..d24ac84 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,7 +13,7 @@ use crate::frontier::Frontier; use clap::{ArgAction, CommandFactory, Parser, ValueEnum}; use clap::error::ErrorKind; -use image::{self, ColorType, ImageEncoder, ImageError, Rgba, RgbaImage}; +use image::{self, ExtendedColorType, ImageEncoder, ImageError, Rgba, RgbaImage}; use image::codecs::png::{CompressionType, FilterType, PngEncoder}; use rand::{self, SeedableRng}; @@ -193,12 +193,6 @@ impl From for AppError { } } -impl From for AppError { - fn from(err: rand::Error) -> Self { - Self::RuntimeError(Box::new(err)) - } -} - /// Result type for this app. type AppResult = Result; @@ -391,7 +385,7 @@ impl App { self.paint_on(colors, ImageFrontier::::new(&img)) } FrontierArg::Min => { - let rng = Pcg64::from_rng(&mut self.rng)?; + let rng = Pcg64::from_rng(&mut self.rng); self.paint_on(colors, MinFrontier::::new(rng, width, height, x0, y0)) } FrontierArg::Mean => { @@ -410,7 +404,7 @@ impl App { let writer = BufWriter::new(stdout.lock()); let encoder = PngEncoder::new_with_quality(writer, CompressionType::Fast, FilterType::NoFilter); - encoder.write_image(image, image.width(), image.height(), ColorType::Rgba8)?; + encoder.write_image(image, image.width(), image.height(), ExtendedColorType::Rgba8)?; Ok(()) } -- cgit v1.2.3