From f46e39c5c5435696daab9df075482e6e5c83533b Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Fri, 26 Mar 2021 12:34:25 -0400 Subject: remove macro_use (#9884) --- cli/colors.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cli/colors.rs') diff --git a/cli/colors.rs b/cli/colors.rs index 278c141b4..5eafef4d4 100644 --- a/cli/colors.rs +++ b/cli/colors.rs @@ -4,7 +4,6 @@ #![allow(dead_code)] use regex::Regex; -use std::env; use std::fmt; use std::io::Write; use termcolor::Color::{Ansi256, Black, Blue, Cyan, Green, Red, White, Yellow}; @@ -13,14 +12,14 @@ use termcolor::{Ansi, ColorSpec, WriteColor}; #[cfg(windows)] use termcolor::{BufferWriter, ColorChoice}; -lazy_static! { +lazy_static::lazy_static! { // STRIP_ANSI_RE and strip_ansi_codes are lifted from the "console" crate. // Copyright 2017 Armin Ronacher . MIT License. static ref STRIP_ANSI_RE: Regex = Regex::new( r"[\x1b\x9b][\[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]" ).unwrap(); static ref NO_COLOR: bool = { - env::var_os("NO_COLOR").is_some() + std::env::var_os("NO_COLOR").is_some() }; } -- cgit v1.2.3