misc improvements

This commit is contained in:
Anton-4 2024-03-04 17:10:59 +01:00
parent c47fff04d2
commit f620508a37
No known key found for this signature in database
GPG key ID: 0971D718C0A9B937
6 changed files with 14 additions and 46 deletions

View file

@ -531,7 +531,7 @@ pub fn test(matches: &ArgMatches, triple: Triple) -> io::Result<i32> {
"if there were errors, we would have already exited."
);
if problems.warnings > 0 {
problems.print_to_stdout(start_time.elapsed());
problems.print_error_warning_count(start_time.elapsed());
println!(".\n\nRunning tests…\n\n\x1B[36m{}\x1B[39m", "".repeat(80));
}
}
@ -824,7 +824,7 @@ pub fn build(
// since the process is about to exit anyway.
// std::mem::forget(arena);
problems.print_to_stdout(total_time);
problems.print_error_warning_count(total_time);
println!(" while successfully building:\n\n {generated_filename}");
// Return a nonzero exit code if there were problems
@ -832,7 +832,7 @@ pub fn build(
}
BuildAndRun => {
if problems.fatally_errored {
problems.print_to_stdout(total_time);
problems.print_error_warning_count(total_time);
println!(
".\n\nCannot run program due to fatal error…\n\n\x1B[36m{}\x1B[39m",
"".repeat(80)
@ -842,7 +842,7 @@ pub fn build(
return Ok(problems.exit_code());
}
if problems.errors > 0 || problems.warnings > 0 {
problems.print_to_stdout(total_time);
problems.print_error_warning_count(total_time);
println!(
".\n\nRunning program anyway…\n\n\x1B[36m{}\x1B[39m",
"".repeat(80)
@ -862,7 +862,7 @@ pub fn build(
}
BuildAndRunIfNoErrors => {
if problems.fatally_errored {
problems.print_to_stdout(total_time);
problems.print_error_warning_count(total_time);
println!(
".\n\nCannot run program due to fatal error…\n\n\x1B[36m{}\x1B[39m",
"".repeat(80)
@ -877,7 +877,7 @@ pub fn build(
);
if problems.warnings > 0 {
problems.print_to_stdout(total_time);
problems.print_error_warning_count(total_time);
println!(
".\n\nRunning program…\n\n\x1B[36m{}\x1B[39m",
"".repeat(80)