Issue 3264: refactor supported_terminal

Use better code style
This commit is contained in:
Alexander McLin
2026-04-12 08:42:15 -04:00
parent d5d514ec96
commit 257209df75

View File

@@ -38,12 +38,6 @@ pub(crate) fn get_key() -> KeyEvent {
} }
fn supported_terminal() -> bool { fn supported_terminal() -> bool {
#[cfg(windows)]
let windows_os = true;
#[cfg(not(windows))]
let windows_os = false;
// If OS is Windows and stdin is not a tty, it's either a pipe or an unsupported terminal configuration. // If OS is Windows and stdin is not a tty, it's either a pipe or an unsupported terminal configuration.
!windows_os || std::io::stdin().is_tty() cfg!(not(windows)) || std::io::stdin().is_tty()
} }