Remove redundant is_terminal check.

It's not necessary because `show_md_content_with_pager` is only ever
called if `is_terminal` is true.
This commit is contained in:
Nicholas Nethercote 2024-11-20 14:10:44 +11:00
parent 15528b2d6c
commit 91164957ec

View File

@ -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,
};