diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
commit | dc0db358abe19481e475e10c32149b53370f1a1c (patch) | |
tree | ab8ce99c4b255ce46f99ef402c27916055b899ee /vendor/anstream/src/auto.rs | |
parent | Releasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff) | |
download | rustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip |
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/anstream/src/auto.rs')
-rw-r--r-- | vendor/anstream/src/auto.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/vendor/anstream/src/auto.rs b/vendor/anstream/src/auto.rs index c2317460d..b252c05cb 100644 --- a/vendor/anstream/src/auto.rs +++ b/vendor/anstream/src/auto.rs @@ -58,7 +58,7 @@ where #[cfg(feature = "auto")] { if raw.is_terminal() { - let _ = concolor_query::windows::enable_ansi_colors(); + let _ = anstyle_query::windows::enable_ansi_colors(); } } Self::always_ansi_(raw) @@ -76,8 +76,8 @@ where if cfg!(windows) { #[cfg(feature = "auto")] let use_wincon = raw.is_terminal() - && !concolor_query::windows::enable_ansi_colors().unwrap_or(true) - && !concolor_query::term_supports_ansi_color(); + && !anstyle_query::windows::enable_ansi_colors().unwrap_or(true) + && !anstyle_query::term_supports_ansi_color(); #[cfg(not(feature = "auto"))] let use_wincon = true; if use_wincon { @@ -137,19 +137,19 @@ where #[cfg(feature = "auto")] fn choice(raw: &dyn RawStream) -> ColorChoice { - let choice = concolor_override::get(); + let choice = ColorChoice::global(); match choice { ColorChoice::Auto => { - let clicolor = concolor_query::clicolor(); + let clicolor = anstyle_query::clicolor(); let clicolor_enabled = clicolor.unwrap_or(false); let clicolor_disabled = !clicolor.unwrap_or(true); if raw.is_terminal() - && !concolor_query::no_color() + && !anstyle_query::no_color() && !clicolor_disabled - && (concolor_query::term_supports_color() + && (anstyle_query::term_supports_color() || clicolor_enabled - || concolor_query::is_ci()) - || concolor_query::clicolor_force() + || anstyle_query::is_ci()) + || anstyle_query::clicolor_force() { ColorChoice::Always } else { |