Skip to content
Snippets Groups Projects
Verified Commit 0777566b authored by Louis's avatar Louis :fire:
Browse files

Fix clippy warnings

parent 728f2fe8
No related branches found
No related tags found
No related merge requests found
Pipeline #329 passed with stages
in 1 minute and 36 seconds
use crate::commands::palette::ColourMapping;
use crate::commands::Palette;
use crate::utils::{RgbaOutputFormat, TypedOutputFormat}; use crate::utils::{RgbaOutputFormat};
use anyhow::Error; use anyhow::Error;
use clap::Parser; use clap::Parser;
use image::{GenericImage, ImageBuffer, Rgba, RgbaImage}; use image::{GenericImage};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use std::collections::HashMap;
/// Limit the number of colours by quantity or threshold /// Limit the number of colours by quantity or threshold
#[derive(Debug, Clone, Parser, Serialize, Deserialize)] #[derive(Debug, Clone, Parser, Serialize, Deserialize)]
...@@ -27,7 +27,7 @@ pub struct Reduce { ...@@ -27,7 +27,7 @@ pub struct Reduce {
} }
impl Reduce { impl Reduce {
pub fn run<T: GenericImage>(&self, mut image: &T) -> anyhow::Result<RgbaOutputFormat> { pub fn run<T: GenericImage>(&self, _image: &T) -> anyhow::Result<RgbaOutputFormat> {
Err(Error::msg("Reduce is not implemented")) Err(Error::msg("Reduce is not implemented"))
// TODO: Reduce impl // TODO: Reduce impl
......
use crate::utils::{RgbaOutputFormat, SpriteData};
use anyhow::Error;
use clap::Parser; use clap::Parser;
use image::imageops::tile;
use image::{ use image::{
save_buffer, save_buffer_with_format, GenericImage, GenericImageView, ImageBuffer, ImageFormat, GenericImageView, ImageFormat,
Pixel, Rgba, RgbaImage, Pixel, RgbaImage,
}; };
use num_traits::cast::ToPrimitive;
use num_traits::AsPrimitive; use num_traits::AsPrimitive;
use rayon::prelude::{IntoParallelIterator, IntoParallelRefIterator};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use std::io::Read;
use std::path::PathBuf; use std::path::PathBuf;
#[inline(always)] #[inline(always)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment