From 6541be3c6f2a8f4f5f5ccd29a793f8ea700a5786 Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Mon, 21 May 2018 15:32:27 +1200 Subject: Replace `use_colored_tty` with iatty crate --- src/rustfmt_diff.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/rustfmt_diff.rs') diff --git a/src/rustfmt_diff.rs b/src/rustfmt_diff.rs index 33d7febbd64..de52b28c08b 100644 --- a/src/rustfmt_diff.rs +++ b/src/rustfmt_diff.rs @@ -13,7 +13,6 @@ use diff; use std::collections::VecDeque; use std::io; use std::io::Write; -use utils::use_colored_tty; #[derive(Debug, PartialEq)] pub enum DiffLine { @@ -53,7 +52,7 @@ impl OutputWriter { // for colorized output and the capabilities of the terminal. pub fn new(color: Color) -> Self { if let Some(t) = term::stdout() { - if use_colored_tty(color) && t.supports_color() { + if color.use_colored_tty() && t.supports_color() { return OutputWriter { terminal: Some(t) }; } } -- cgit 1.4.1-3-g733a5