diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2018-05-21 15:32:27 +1200 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2018-05-21 15:32:27 +1200 |
| commit | 6541be3c6f2a8f4f5f5ccd29a793f8ea700a5786 (patch) | |
| tree | abf3635c2fab3042f379924e9b7a6e698addaed5 /src/bin | |
| parent | 9a7fac63c8867fc5cf45b3f262f2e385f6992fb3 (diff) | |
Replace `use_colored_tty` with iatty crate
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/main.rs b/src/bin/main.rs index 737eaa93670..fad9eeae6bb 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -28,8 +28,8 @@ use failure::err_msg; use getopts::{Matches, Options}; use rustfmt::{ - checkstyle_footer, checkstyle_header, format_input, load_config, use_colored_tty, CliOptions, - Color, Config, EmitMode, ErrorKind, FileLines, FileName, Input, Summary, Verbosity, + checkstyle_footer, checkstyle_header, format_input, load_config, CliOptions, Color, Config, + EmitMode, ErrorKind, FileLines, FileName, Input, Summary, Verbosity, }; fn main() { @@ -316,7 +316,7 @@ fn format_and_emit_report(input: Input, config: &Config) -> Result<Summary, fail if report.has_warnings() { match term::stderr() { Some(ref t) - if use_colored_tty(config.color()) + if config.color().use_colored_tty() && t.supports_color() && t.supports_attr(term::Attr::Bold) => { |
