janitor: Do not spam the build output with empty lines

This commit is contained in:
Tobias Hunger 2023-11-01 17:26:16 +01:00 committed by Tobias Hunger
parent 2adc3713fa
commit d62c98d574

View file

@ -409,8 +409,10 @@ impl BuildDiagnostics {
})
.collect();
let mut emitter = emitter_factory(output, Some(&codemap));
emitter.emit(&diags);
if !diags.is_empty() {
let mut emitter = emitter_factory(output, Some(&codemap));
emitter.emit(&diags);
}
}
#[cfg(feature = "display-diagnostics")]