summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeter Williams <peter@newton.cx>2017-02-05 11:02:54 -0500
committerAndrew Gallant <jamslam@gmail.com>2017-02-09 20:57:23 -0500
commit22cb644eb6fc7872c1a0e5e084791b87382014b4 (patch)
tree59d5b3a91fdcf1f9dcb7f9276d98ab13e597dd1e /src
parente424f874872d05ef60d8eb9565806ed64815b3b5 (diff)
termcolor: add support for output to standard error
This is essentially a rename of the existing `Stdout` type to `StandardStream` and a change of its constructor from a single `new()` function to have two `stdout()` and `stderr()` functions. Under the hood, we add add internal IoStandardStream{,Lock} enums that allow us to abstract between Stdout and Stderr conveniently. The rest of the needed changes then fall out fairly naturally. Fixes #324. [breaking-change]
Diffstat (limited to 'src')
-rw-r--r--src/args.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/args.rs b/src/args.rs
index 15184d4e..68b8ca09 100644
--- a/src/args.rs
+++ b/src/args.rs
@@ -182,8 +182,8 @@ impl Args {
}
/// Create a new writer for single-threaded searching with color support.
- pub fn stdout(&self) -> termcolor::Stdout {
- termcolor::Stdout::new(self.color_choice)
+ pub fn stdout(&self) -> termcolor::StandardStream {
+ termcolor::StandardStream::stdout(self.color_choice)
}
/// Returns a handle to stdout for filtering search.