removed duplicate code

This commit is contained in:
Anton-4 2024-02-16 15:13:40 +01:00
parent 719e32e0f0
commit 00d1ac0aef
No known key found for this signature in database
GPG key ID: 0971D718C0A9B937
3 changed files with 42 additions and 30 deletions

View file

@ -210,33 +210,7 @@ fn main() -> io::Result<()> {
threading,
) {
Ok((problems, total_time)) => {
println!(
"\x1B[{}m{}\x1B[39m {} and \x1B[{}m{}\x1B[39m {} found in {} ms.",
if problems.errors == 0 {
32 // green
} else {
33 // yellow
},
problems.errors,
if problems.errors == 1 {
"error"
} else {
"errors"
},
if problems.warnings == 0 {
32 // green
} else {
33 // yellow
},
problems.warnings,
if problems.warnings == 1 {
"warning"
} else {
"warnings"
},
total_time.as_millis(),
);
problems.print_to_stdout(total_time);
Ok(problems.exit_code())
}