Skip to content

Commit

Permalink
chore: replace atty with is-terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
jcgruenhage committed Mar 29, 2023
1 parent 2f53607 commit f240862
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -25,7 +25,7 @@ serde = "1.0"
serde_json = "1.0"
serde_derive = "1.0"
ciborium = "0.2.0"
atty = "0.2.6"
is-terminal = "0.4.6"
clap = { version = "3.1", default-features = false, features = ["std"] }
walkdir = "2.3"
tinytemplate = "1.1"
Expand Down
4 changes: 3 additions & 1 deletion src/lib.rs
Expand Up @@ -36,6 +36,7 @@ extern crate approx;
#[cfg(test)]
extern crate quickcheck;

use is_terminal::IsTerminal;
use regex::Regex;

#[cfg(feature = "real_blackbox")]
Expand Down Expand Up @@ -76,6 +77,7 @@ use std::cell::RefCell;
use std::collections::HashSet;
use std::default::Default;
use std::env;
use std::io::stdout;
use std::net::TcpStream;
use std::path::{Path, PathBuf};
use std::process::Command;
Expand Down Expand Up @@ -1060,7 +1062,7 @@ https://bheisler.github.io/criterion.rs/book/faq.html
} else {
CliVerbosity::Normal
};
let stdout_isatty = atty::is(atty::Stream::Stdout);
let stdout_isatty = stdout().is_terminal();
let mut enable_text_overwrite = stdout_isatty && !verbose && !debug_enabled();
let enable_text_coloring;
match matches.value_of("color") {
Expand Down

0 comments on commit f240862

Please sign in to comment.