From e4ff2ef6be00f9eb6243e90aa0684087baca6767 Mon Sep 17 00:00:00 2001
From: Louis Capitanchik <contact@louiscap.co>
Date: Fri, 22 Sep 2023 22:07:32 +0100
Subject: [PATCH] Clippy Lints

---
 Cargo.lock              |  2 +-
 src/commands/extract.rs | 14 +-------------
 src/commands/info.rs    |  5 ++---
 src/commands/reduce.rs  |  2 +-
 4 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index 1772431..2601312 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -233,7 +233,7 @@ dependencies = [
 
 [[package]]
 name = "crunch-cli"
-version = "0.6.0"
+version = "0.7.0"
 dependencies = [
  "anyhow",
  "clap",
diff --git a/src/commands/extract.rs b/src/commands/extract.rs
index 4daaf95..f708db4 100644
--- a/src/commands/extract.rs
+++ b/src/commands/extract.rs
@@ -1,16 +1,9 @@
-use crate::utils::new_image;
 use clap::Parser;
 use image::{GenericImage, GenericImageView, Pixel, Rgba, RgbaImage};
-use rayon::prelude::*;
 use serde::{Deserialize, Serialize};
 use std::collections::HashSet;
 use std::ops::{Deref, DerefMut};
 use std::path::PathBuf;
-use std::sync::Arc;
-
-fn default_max_size() -> usize {
-	2048
-}
 
 /// Extract individual, non-square sprites from a given spritesheet
 #[derive(Parser, Serialize, Deserialize, Clone, Debug)]
@@ -27,7 +20,6 @@ pub struct Extract {
 struct PixelData {
 	x: u32,
 	y: u32,
-	pixel: Rgba<u8>,
 }
 
 #[derive(Debug)]
@@ -133,11 +125,7 @@ impl Extract {
 					continue;
 				}
 
-				current.push(PixelData {
-					x: cx,
-					y: cy,
-					pixel,
-				});
+				current.push(PixelData { x: cx, y: cy });
 
 				let x = [-1, 0, 1];
 				let y = [-1, 0, 1];
diff --git a/src/commands/info.rs b/src/commands/info.rs
index 4947ad4..140deea 100644
--- a/src/commands/info.rs
+++ b/src/commands/info.rs
@@ -1,6 +1,5 @@
-use crate::utils::TypedOutputFormat;
-use clap::{Parser, ValueEnum};
-use image::{imageops, GenericImage, ImageFormat, Pixel};
+use clap::Parser;
+use image::{GenericImage, ImageFormat, Pixel};
 use serde::{Deserialize, Serialize};
 
 /// Extract Information About An Image
diff --git a/src/commands/reduce.rs b/src/commands/reduce.rs
index 1b4ef55..5c4f496 100644
--- a/src/commands/reduce.rs
+++ b/src/commands/reduce.rs
@@ -24,7 +24,7 @@ pub struct Reduce {
 }
 
 impl Reduce {
-	pub fn run<T: GenericImage>(&self, _image: &T) -> anyhow::Result<RgbaOutputFormat> {
+	pub fn _run<T: GenericImage>(&self, _image: &T) -> anyhow::Result<RgbaOutputFormat> {
 		Err(Error::msg("Reduce is not implemented"))
 
 		// TODO: Reduce impl
-- 
GitLab