diff --git a/Cargo.lock b/Cargo.lock index 43deacf..0e23f1f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -275,7 +275,6 @@ dependencies = [ name = "tagref" version = "1.10.0" dependencies = [ - "atty", "clap", "colored", "ignore", diff --git a/Cargo.toml b/Cargo.toml index 55fe4c1..2866f1e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,6 @@ clippy.pedantic = { level = "deny", priority = -1 } rust.warnings = "deny" [dependencies] -atty = "0.2" colored = "1" ignore = "0.4" regex = "1" diff --git a/src/main.rs b/src/main.rs index 4c6203e..443e03c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,13 +7,12 @@ mod tag_references; mod walk; use { - atty::Stream, clap::{App, AppSettings, Arg, SubCommand}, colored::Colorize, directive::compile_directive_regex, std::{ collections::{HashMap, HashSet}, - io::BufReader, + io::{self, BufReader, IsTerminal}, path::{Path, PathBuf}, process::exit, sync::{Arc, Mutex}, @@ -203,8 +202,7 @@ fn settings() -> Settings { #[allow(clippy::too_many_lines)] fn entry() -> Result<(), String> { // Determine whether to print colored output. - colored::control::set_override(atty::is(Stream::Stdout)); - + colored::control::set_override(io::stdout().is_terminal()); // Parse the command-line options. let settings = settings();