Skip to content

Commit 9116495

Browse files
committed
Remove redundant is_terminal check.
It's not necessary because `show_md_content_with_pager` is only ever called if `is_terminal` is true.
1 parent 15528b2 commit 9116495

File tree

1 file changed

+1
-2
lines changed
  • compiler/rustc_driver_impl/src

1 file changed

+1
-2
lines changed

Diff for: compiler/rustc_driver_impl/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -620,8 +620,7 @@ fn show_md_content_with_pager(content: &str, color: ColorConfig) {
620620
// to standard output
621621
if fallback_to_println {
622622
let fmt_success = match color {
623-
ColorConfig::Auto => io::stdout().is_terminal() && bufwtr.print(&mdbuf).is_ok(),
624-
ColorConfig::Always => bufwtr.print(&mdbuf).is_ok(),
623+
ColorConfig::Auto | ColorConfig::Always => bufwtr.print(&mdbuf).is_ok(),
625624
ColorConfig::Never => false,
626625
};
627626

0 commit comments

Comments
 (0)