summaryrefslogtreecommitdiff
path: root/cli/colors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/colors.rs')
-rw-r--r--cli/colors.rs5
1 files changed, 2 insertions, 3 deletions
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 <armin.ronacher@active-4.com>. 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()
};
}