mirror of https://github.com/rwf2/Rocket.git
Replace deprecated 'isatty' with 'atty'.
This commit is contained in:
parent
8b9bab8e83
commit
75d2ea96d9
|
@ -34,7 +34,7 @@ time = "0.1"
|
|||
memchr = "2" # TODO: Use pear instead.
|
||||
base64 = "0.10"
|
||||
pear = "0.1"
|
||||
isatty = "0.1"
|
||||
atty = "0.2"
|
||||
|
||||
[build-dependencies]
|
||||
yansi = "0.5"
|
||||
|
|
|
@ -109,7 +109,7 @@ extern crate state;
|
|||
extern crate time;
|
||||
extern crate memchr;
|
||||
extern crate base64;
|
||||
extern crate isatty;
|
||||
extern crate atty;
|
||||
|
||||
#[cfg(test)] #[macro_use] extern crate lazy_static;
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ crate fn try_init(level: LoggingLevel, verbose: bool) -> bool {
|
|||
return false;
|
||||
}
|
||||
|
||||
if !::isatty::stdout_isatty()
|
||||
if !::atty::is(::atty::Stream::Stdout)
|
||||
|| (cfg!(windows) && !Paint::enable_windows_ascii())
|
||||
|| env::var_os(COLORS_ENV).map(|v| v == "0" || v == "off").unwrap_or(false)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue