summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml2
-rw-r--r--src/lib.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 180ded1..668167c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -25,5 +25,5 @@ name = "prettytable"
unicode-width = "^0.1"
term = "^0.4"
lazy_static = "^0.2"
-atty = "^0.1"
+atty = "^0.2"
encode_unicode = "^0.2"
diff --git a/src/lib.rs b/src/lib.rs
index 622dd3e..0c477d1 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -160,7 +160,7 @@ impl <'a> TableSlice<'a> {
/// # Panic
/// Panic if writing to standard output fails
pub fn print_tty(&self, force_colorize: bool) {
- let r = match (stdout(), atty::is() || force_colorize) {
+ let r = match (stdout(), atty::is(atty::Stream::Stdout) || force_colorize) {
(Some(mut o), true) => self.print_term(&mut *o),
_ => self.print(&mut io::stdout()),
};