Skip to content

Commit a211230

Browse files
authored
chore: replace atty with is-terminal (#628)
1 parent a844eb2 commit a211230

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ serde = "1.0"
2525
serde_json = "1.0"
2626
serde_derive = "1.0"
2727
ciborium = "0.2.0"
28-
atty = "0.2.6"
28+
is-terminal = "0.4.6"
2929
clap = { version = "3.1", default-features = false, features = ["std"] }
3030
walkdir = "2.3"
3131
tinytemplate = "1.1"

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ extern crate approx;
3636
#[cfg(test)]
3737
extern crate quickcheck;
3838

39+
use is_terminal::IsTerminal;
3940
use regex::Regex;
4041

4142
#[cfg(feature = "real_blackbox")]
@@ -76,6 +77,7 @@ use std::cell::RefCell;
7677
use std::collections::HashSet;
7778
use std::default::Default;
7879
use std::env;
80+
use std::io::stdout;
7981
use std::net::TcpStream;
8082
use std::path::{Path, PathBuf};
8183
use std::process::Command;
@@ -1060,7 +1062,7 @@ https://bheisler.github.io/criterion.rs/book/faq.html
10601062
} else {
10611063
CliVerbosity::Normal
10621064
};
1063-
let stdout_isatty = atty::is(atty::Stream::Stdout);
1065+
let stdout_isatty = stdout().is_terminal();
10641066
let mut enable_text_overwrite = stdout_isatty && !verbose && !debug_enabled();
10651067
let enable_text_coloring;
10661068
match matches.value_of("color") {

0 commit comments

Comments
 (0)