From cc6b6dcf5bb1e6be3d16bb7125058295892c9ab9 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Fri, 9 Sep 2016 08:53:10 -0400 Subject: [PATCH] fix windows build --- src/out.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/out.rs b/src/out.rs index 14999127..8a9d6abb 100644 --- a/src/out.rs +++ b/src/out.rs @@ -9,25 +9,25 @@ use term::WinConsole; use terminal::TerminfoTerminal; -pub type StdoutTerminal = Box> + Send>; +pub type StdoutTerminal = Box + Send>; /// Gets a terminal that supports color if available. #[cfg(windows)] fn term_stdout(color: bool) -> StdoutTerminal { - let stdout = io::BufWriter::new(io::stdout()); + let stdout = io::stdout(); WinConsole::new(stdout) .ok() - .map(|t| Box::new(t)) + .map(|t| Box::new(t) as StdoutTerminal) .unwrap_or_else(|| { - let stdout = io::BufWriter::new(io::stdout()); - Box::new(NoColorTerminal::new(stdout)) + let stdout = io::stdout(); + Box::new(NoColorTerminal::new(stdout)) as StdoutTerminal }) } /// Gets a terminal that supports color if available. #[cfg(not(windows))] fn term_stdout(color: bool) -> StdoutTerminal { - let stdout = io::BufWriter::new(io::stdout()); + let stdout = io::stdout(); if !color || TERMINFO.is_none() { Box::new(NoColorTerminal::new(stdout)) } else {