From 5341de2163f1485a05d2642338396d4645fcb20a Mon Sep 17 00:00:00 2001 From: Josh Holmer Date: Mon, 3 Apr 2023 23:30:28 -0400 Subject: [PATCH] Fix new clippy lints --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index ec27eeb5..17bdaee0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -361,7 +361,7 @@ pub fn optimize(input: &InFile, output: &OutFile, opts: &Options) -> PngResult<( info!("File already optimized"); match (output, input) { // if p is None, it also means same as the input path - (&OutFile::Path(ref p), &InFile::Path(ref input_path)) + (OutFile::Path(ref p), InFile::Path(ref input_path)) if p.as_ref().map_or(true, |p| p == input_path) => { return Ok(()); @@ -384,7 +384,7 @@ pub fn optimize(input: &InFile, output: &OutFile, opts: &Options) -> PngResult<( .write_all(&optimized_output) .map_err(|e| PngError::new(&format!("Unable to write to stdout: {}", e)))?; } - (&OutFile::Path(ref output_path), _) => { + (OutFile::Path(ref output_path), _) => { let output_path = output_path .as_ref() .map(|p| p.as_path())