From 50f4834ef2f5fc30f546dd64d52ed14f9890a233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kornel=20Lesi=C5=84ski?= Date: Mon, 14 Jan 2019 23:14:05 +0000 Subject: [PATCH] Fix verbose message --- src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 3f1e8ebd..e1fecc5b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -357,7 +357,9 @@ pub fn optimize(input: &InFile, output: &OutFile, opts: &Options) -> PngResult<( let mut optimized_output = optimize_png(&mut png, &in_data, opts)?; if is_fully_optimized(in_data.len(), optimized_output.len(), opts) { - eprintln!("File already optimized"); + if opts.verbosity.is_some() { + eprintln!("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))