Rocket

A web framework for Rust. https://rocket.rs (mirror)
git clone git://git.thc420.xyz/Rocket
Log | Files | Refs | README

commit 75d2ea96d926f5d34d9bd249aeea912e29738856
parent 8b9bab8e83fe2543369757a97cd09d6cc325133c
Author: Richard Petrie <rap1011@ksu.edu>
Date:   Sat,  9 Feb 2019 06:29:02 -0500

Replace deprecated 'isatty' with 'atty'.

Diffstat:
Mcore/lib/Cargo.toml | 2+-
Mcore/lib/src/lib.rs | 2+-
Mcore/lib/src/logger.rs | 2+-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/core/lib/Cargo.toml b/core/lib/Cargo.toml @@ -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" diff --git a/core/lib/src/lib.rs b/core/lib/src/lib.rs @@ -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; diff --git a/core/lib/src/logger.rs b/core/lib/src/logger.rs @@ -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) {