From 8eb97b076f4fb22e7420708d32e11cf03fa4f2e6 Mon Sep 17 00:00:00 2001 From: Devon Sawatsky Date: Sat, 21 Oct 2023 22:12:35 -0700 Subject: fix clippy lints in gifprobe --- gifprobe/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gifprobe') diff --git a/gifprobe/src/main.rs b/gifprobe/src/main.rs index 64cee94..fd6b189 100644 --- a/gifprobe/src/main.rs +++ b/gifprobe/src/main.rs @@ -10,7 +10,7 @@ use gifed::{ use owo_colors::OwoColorize; fn main() { - let file = if let Some(file) = std::env::args().skip(1).next() { + let file = if let Some(file) = std::env::args().nth(1) { file } else { println!("usage: gifprobe file.gif"); @@ -49,7 +49,7 @@ fn main() { ); if colors { - for (idx, clr) in plt.into_iter().enumerate() { + for (idx, clr) in plt.iter().enumerate() { println!( "\t{} {}, {}, {}", idx.color(owo_colors::Rgb(clr.r, clr.g, clr.b)), @@ -217,7 +217,7 @@ fn describe_image(bli: CompressedImage, offset: Range, expand: bool, colo ); if colors { - for (idx, clr) in plt.into_iter().enumerate() { + for (idx, clr) in plt.iter().enumerate() { println!("\t{idx} {}, {}, {}", clr.r, clr.g, clr.b); } } -- cgit 1.4.1-3-g733a5