Enhance verbosity check (#578)

as suggested here: https://github.com/lycheeverse/lychee/pull/570#discussion_r835931903

Signed-off-by: MichaIng <micha@dietpi.com>
This commit is contained in:
MichaIng 2022-04-04 10:31:30 +02:00 committed by GitHub
parent 03d28820bb
commit b338ba2abc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,13 +155,7 @@ fn show_progress(
if verbose {
pb.println(out);
}
} else {
#[allow(clippy::collapsible_if)]
if !verbose {
if response.status().is_success() || response.status().is_excluded() {
return Ok(());
}
}
} else if verbose || (!response.status().is_success() && !response.status().is_excluded()) {
writeln!(output, "{out}")?;
}
Ok(())