diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-11-20 14:10:44 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-11-21 08:21:01 +1100 |
| commit | 91164957ec18aa65aa00412f703f2270e47779c1 (patch) | |
| tree | cfb287860cae7d400a85d94e89001a7b5cc01d9f /compiler | |
| parent | 15528b2d6c2d7d83d007440ab84d859bc60ab40d (diff) | |
| download | rust-91164957ec18aa65aa00412f703f2270e47779c1.tar.gz rust-91164957ec18aa65aa00412f703f2270e47779c1.zip | |
Remove redundant `is_terminal` check.
It's not necessary because `show_md_content_with_pager` is only ever called if `is_terminal` is true.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_driver_impl/src/lib.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index 038a0d6c288..6198f40e83d 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -620,8 +620,7 @@ fn show_md_content_with_pager(content: &str, color: ColorConfig) { // to standard output if fallback_to_println { let fmt_success = match color { - ColorConfig::Auto => io::stdout().is_terminal() && bufwtr.print(&mdbuf).is_ok(), - ColorConfig::Always => bufwtr.print(&mdbuf).is_ok(), + ColorConfig::Auto | ColorConfig::Always => bufwtr.print(&mdbuf).is_ok(), ColorConfig::Never => false, }; |
