diff --git a/src/fmt/writer/buffer.rs b/src/fmt/writer/buffer.rs index a7ea25b..b720a98 100644 --- a/src/fmt/writer/buffer.rs +++ b/src/fmt/writer/buffer.rs @@ -31,10 +31,13 @@ impl BufferWriter { } } - pub(in crate::fmt::writer) fn pipe(pipe: Box>) -> Self { + pub(in crate::fmt::writer) fn pipe( + pipe: Box>, + write_style: WriteStyle, + ) -> Self { BufferWriter { target: WritableTarget::Pipe(pipe), - write_style: WriteStyle::Never, + write_style, } } diff --git a/src/fmt/writer/mod.rs b/src/fmt/writer/mod.rs index dbcf45b..688fda1 100644 --- a/src/fmt/writer/mod.rs +++ b/src/fmt/writer/mod.rs @@ -138,7 +138,7 @@ impl Builder { let writer = match mem::take(&mut self.target) { Target::Stdout => BufferWriter::stdout(self.is_test, color_choice), Target::Stderr => BufferWriter::stderr(self.is_test, color_choice), - Target::Pipe(pipe) => BufferWriter::pipe(Box::new(Mutex::new(pipe))), + Target::Pipe(pipe) => BufferWriter::pipe(Box::new(Mutex::new(pipe)), color_choice), }; Writer { inner: writer }