From 15c54a615de74ec32ae3cabf26394ac4222faa4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20M=2E=20Bezerra?= Date: Fri, 15 Oct 2021 09:35:07 -0300 Subject: [PATCH] Renaming NO_COLOR_IS_SET to DISABLE_COLORED_TEXT --- src/utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.rs b/src/utils.rs index 74b7210..a372051 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -67,14 +67,14 @@ pub struct Bytes { pub mod colors { use once_cell::sync::Lazy; - static NO_COLOR_IS_SET: Lazy = Lazy::new(|| { + static DISABLE_COLORED_TEXT: Lazy = Lazy::new(|| { std::env::var_os("NO_COLOR").is_some() || atty::isnt(atty::Stream::Stdout) || atty::isnt(atty::Stream::Stderr) }); macro_rules! color { ($name:ident = $value:literal) => { #[cfg(target_family = "unix")] - pub static $name: Lazy<&str> = Lazy::new(|| if *NO_COLOR_IS_SET { "" } else { $value }); + pub static $name: Lazy<&str> = Lazy::new(|| if *DISABLE_COLORED_TEXT { "" } else { $value }); #[cfg(not(target_family = "unix"))] pub static $name: &&str = &""; };