Fix new clippy lints
This commit is contained in:
parent
fd5027a017
commit
5341de2163
1 changed files with 2 additions and 2 deletions
|
|
@ -361,7 +361,7 @@ pub fn optimize(input: &InFile, output: &OutFile, opts: &Options) -> PngResult<(
|
||||||
info!("File already optimized");
|
info!("File already optimized");
|
||||||
match (output, input) {
|
match (output, input) {
|
||||||
// if p is None, it also means same as the input path
|
// 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) =>
|
if p.as_ref().map_or(true, |p| p == input_path) =>
|
||||||
{
|
{
|
||||||
return Ok(());
|
return Ok(());
|
||||||
|
|
@ -384,7 +384,7 @@ pub fn optimize(input: &InFile, output: &OutFile, opts: &Options) -> PngResult<(
|
||||||
.write_all(&optimized_output)
|
.write_all(&optimized_output)
|
||||||
.map_err(|e| PngError::new(&format!("Unable to write to stdout: {}", e)))?;
|
.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
|
let output_path = output_path
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|p| p.as_path())
|
.map(|p| p.as_path())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue