diff --git a/termcolor/src/lib.rs b/termcolor/src/lib.rs index 81825898..4e4b0865 100644 --- a/termcolor/src/lib.rs +++ b/termcolor/src/lib.rs @@ -971,18 +971,18 @@ impl WriteColor for Ansi { fn set_color(&mut self, spec: &ColorSpec) -> io::Result<()> { self.reset()?; - if let Some(ref c) = spec.fg_color { - self.write_color(true, c, spec.intense)?; - } - if let Some(ref c) = spec.bg_color { - self.write_color(false, c, spec.intense)?; - } if spec.bold { self.write_str("\x1B[1m")?; } if spec.underline { self.write_str("\x1B[4m")?; } + if let Some(ref c) = spec.fg_color { + self.write_color(true, c, spec.intense)?; + } + if let Some(ref c) = spec.bg_color { + self.write_color(false, c, spec.intense)?; + } Ok(()) }