Skip to content

Commit 974561d

Browse files
chore: don't color punctuation in output diagnostics (#222)
1 parent 9659f32 commit 974561d

File tree

1 file changed

+4
-5
lines changed
  • crates/compilers/src/compile/output

1 file changed

+4
-5
lines changed

crates/compilers/src/compile/output/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -911,13 +911,12 @@ impl<C: Compiler> fmt::Display for OutputDiagnostics<'_, C> {
911911
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
912912
f.write_str("Compiler run ")?;
913913
if self.has_error() {
914-
Paint::red("failed:")
914+
write!(f, "{}:", "failed".red())
915915
} else if self.has_warning() {
916-
Paint::yellow("successful with warnings:")
916+
write!(f, "{}:", "successful with warnings".yellow())
917917
} else {
918-
Paint::green("successful!")
919-
}
920-
.fmt(f)?;
918+
write!(f, "{}!", "successful".green())
919+
}?;
921920

922921
for err in &self.compiler_output.errors {
923922
if !self.compiler_output.should_ignore(

0 commit comments

Comments
 (0)