diff --git a/Cargo.lock b/Cargo.lock index 8e0e9cb4..5a03f209 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -101,17 +101,6 @@ dependencies = [ "wait-timeout", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.4.0" @@ -519,15 +508,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.4.0" @@ -755,7 +735,7 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi 0.4.0", + "hermit-abi", "libc", "windows-sys 0.52.0", ] @@ -1384,7 +1364,6 @@ name = "rustsat-tools" version = "0.4.3" dependencies = [ "anyhow", - "atty", "clap", "concolor-clap", "itertools 0.14.0", diff --git a/Cargo.toml b/Cargo.toml index 2625ccbb..f6d2456e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,6 @@ edition = "2021" [workspace.dependencies] anyhow = "1.0.95" -atty = "0.2.14" bindgen = "0.71.1" bzip2 = "0.5.1" cc = { version = "1.2.14", features = ["parallel"] } diff --git a/tools/Cargo.toml b/tools/Cargo.toml index 7ec2e1ff..b45af50f 100644 --- a/tools/Cargo.toml +++ b/tools/Cargo.toml @@ -8,13 +8,13 @@ description = "Tools and examples built on the RustSAT library" keywords = ["rustsat", "sat", "satisfiability"] repository = "https://github.com/chrjabs/rustsat" readme = "README.md" +rust-version = "1.70.0" include = ["LICENSE", "CHANGELOG.md", "README.md", "/src/"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] anyhow.workspace = true -atty.workspace = true clap.workspace = true concolor-clap.workspace = true itertools.workspace = true diff --git a/tools/src/bin/gbmosplit.rs b/tools/src/bin/gbmosplit.rs index ca296a42..e11379a7 100644 --- a/tools/src/bin/gbmosplit.rs +++ b/tools/src/bin/gbmosplit.rs @@ -18,7 +18,7 @@ use rustsat::{ use std::{ collections::BTreeSet, fmt, - io::{self, Write}, + io::{self, IsTerminal, Write}, path::PathBuf, }; use termcolor::{Buffer, BufferWriter, Color, ColorSpec, WriteColor}; @@ -55,7 +55,7 @@ impl Cli { concolor_clap::ColorChoice::Always => termcolor::ColorChoice::Always, concolor_clap::ColorChoice::Never => termcolor::ColorChoice::Never, concolor_clap::ColorChoice::Auto => { - if atty::is(atty::Stream::Stdout) { + if io::stdout().is_terminal() { termcolor::ColorChoice::Auto } else { termcolor::ColorChoice::Never @@ -66,7 +66,7 @@ impl Cli { concolor_clap::ColorChoice::Always => termcolor::ColorChoice::Always, concolor_clap::ColorChoice::Never => termcolor::ColorChoice::Never, concolor_clap::ColorChoice::Auto => { - if atty::is(atty::Stream::Stderr) { + if io::stderr().is_terminal() { termcolor::ColorChoice::Auto } else { termcolor::ColorChoice::Never