diff --git a/Cargo.toml b/Cargo.toml index 8ed38a2..0eaa78f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,6 @@ time = { version = "^0.3.16", features = ["formatting", "local-offset", "macros" colored = { version = "2", optional = true } [target.'cfg(windows)'.dependencies] -atty = "^0.2.14" windows-sys = { version = "^0.42.0", features = ["Win32_System_Console", "Win32_Foundation"] } [[example]] diff --git a/src/lib.rs b/src/lib.rs index 67cf122..87c85c1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -490,9 +490,9 @@ impl Log for SimpleLogger { #[cfg(all(windows, feature = "colored"))] fn set_up_color_terminal() { - use atty::Stream; + use std::io::{stdout, IsTerminal}; - if atty::is(Stream::Stdout) { + if stdout().is_terminal() { unsafe { use windows_sys::Win32::Foundation::INVALID_HANDLE_VALUE; use windows_sys::Win32::System::Console::{