From 51e8f4f9c2354cdd8c37e7c57f663d867cf3d39e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Gonz=C3=A1lez?= Date: Sat, 6 Dec 2025 15:59:47 +0100 Subject: [PATCH] chore: fix new Clippy lints in code that is not usually checked --- src/deflate/mod.rs | 3 ++- src/lib.rs | 2 +- src/sanity_checks.rs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/deflate/mod.rs b/src/deflate/mod.rs index 1ae49bcb..a8a7dba4 100644 --- a/src/deflate/mod.rs +++ b/src/deflate/mod.rs @@ -1,8 +1,9 @@ mod deflater; +use std::{fmt, fmt::Display}; + pub use deflater::{crc32, deflate, inflate}; use crate::{PngError, PngResult}; -use std::{fmt, fmt::Display}; #[cfg(feature = "zopfli")] mod zopfli_oxipng; diff --git a/src/lib.rs b/src/lib.rs index d2c0bf5d..732615bc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -673,7 +673,7 @@ fn copy_permissions(metadata_input: &Metadata, out_file: &File) -> PngResult<()> } #[cfg(not(feature = "filetime"))] -fn copy_times(_: &Metadata, _: &Path) -> PngResult<()> { +const fn copy_times(_: &Metadata, _: &Path) -> PngResult<()> { Ok(()) } diff --git a/src/sanity_checks.rs b/src/sanity_checks.rs index 0900204f..9ba42c0f 100644 --- a/src/sanity_checks.rs +++ b/src/sanity_checks.rs @@ -44,7 +44,7 @@ fn load_png_image_from_memory(png_data: &[u8]) -> Result, image:: decoder .apng()? .into_frames() - .map(|f| f.map(|f| f.into_buffer())) + .map(|f| f.map(image::Frame::into_buffer)) .collect() } else { DynamicImage::from_decoder(decoder).map(|i| vec![i.into_rgba8()])