diff options
Diffstat (limited to 'vendor/termcolor/src/lib.rs')
-rw-r--r-- | vendor/termcolor/src/lib.rs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/vendor/termcolor/src/lib.rs b/vendor/termcolor/src/lib.rs index 735ce97d2..c93cf7bc8 100644 --- a/vendor/termcolor/src/lib.rs +++ b/vendor/termcolor/src/lib.rs @@ -82,7 +82,7 @@ In many scenarios when using color, one often wants to enable colors automatically when writing to a terminal and disable colors automatically when writing to anything else. The typical way to achieve this in Unix environments is via libc's -[`isatty`](http://man7.org/linux/man-pages/man3/isatty.3.html) +[`isatty`](https://man7.org/linux/man-pages/man3/isatty.3.html) function. Unfortunately, this notoriously does not work well in Windows environments. To work around that, the currently recommended solution is to use the @@ -1450,6 +1450,20 @@ impl<W: io::Write> Ansi<W> { } } +impl WriteColor for io::Sink { + fn supports_color(&self) -> bool { + false + } + + fn set_color(&mut self, _: &ColorSpec) -> io::Result<()> { + Ok(()) + } + + fn reset(&mut self) -> io::Result<()> { + Ok(()) + } +} + /// An in-memory buffer that provides Windows console coloring. /// /// This doesn't actually communicate with the Windows console. Instead, it |