chore: fix new Clippy lints in code that is not usually checked
This commit is contained in:
parent
9c24b1c8ca
commit
51e8f4f9c2
3 changed files with 4 additions and 3 deletions
|
|
@ -1,8 +1,9 @@
|
||||||
mod deflater;
|
mod deflater;
|
||||||
|
use std::{fmt, fmt::Display};
|
||||||
|
|
||||||
pub use deflater::{crc32, deflate, inflate};
|
pub use deflater::{crc32, deflate, inflate};
|
||||||
|
|
||||||
use crate::{PngError, PngResult};
|
use crate::{PngError, PngResult};
|
||||||
use std::{fmt, fmt::Display};
|
|
||||||
|
|
||||||
#[cfg(feature = "zopfli")]
|
#[cfg(feature = "zopfli")]
|
||||||
mod zopfli_oxipng;
|
mod zopfli_oxipng;
|
||||||
|
|
|
||||||
|
|
@ -673,7 +673,7 @@ fn copy_permissions(metadata_input: &Metadata, out_file: &File) -> PngResult<()>
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(feature = "filetime"))]
|
#[cfg(not(feature = "filetime"))]
|
||||||
fn copy_times(_: &Metadata, _: &Path) -> PngResult<()> {
|
const fn copy_times(_: &Metadata, _: &Path) -> PngResult<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ fn load_png_image_from_memory(png_data: &[u8]) -> Result<Vec<RgbaImage>, image::
|
||||||
decoder
|
decoder
|
||||||
.apng()?
|
.apng()?
|
||||||
.into_frames()
|
.into_frames()
|
||||||
.map(|f| f.map(|f| f.into_buffer()))
|
.map(|f| f.map(image::Frame::into_buffer))
|
||||||
.collect()
|
.collect()
|
||||||
} else {
|
} else {
|
||||||
DynamicImage::from_decoder(decoder).map(|i| vec![i.into_rgba8()])
|
DynamicImage::from_decoder(decoder).map(|i| vec![i.into_rgba8()])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue