diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
commit | 64d98f8ee037282c35007b64c2649055c56af1db (patch) | |
tree | 5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /vendor/termcolor/src | |
parent | Adding debian version 1.67.1+dfsg1-1. (diff) | |
download | rustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/termcolor/src')
-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 |