From 257209df75d759c19d0b9d61c7f6ffb05381b5c4 Mon Sep 17 00:00:00 2001 From: Alexander McLin Date: Sun, 12 Apr 2026 08:42:15 -0400 Subject: [PATCH] Issue 3264: refactor `supported_terminal` Use better code style --- src/read/user_interaction.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/read/user_interaction.rs b/src/read/user_interaction.rs index 1f5e106d..e6eab103 100644 --- a/src/read/user_interaction.rs +++ b/src/read/user_interaction.rs @@ -38,12 +38,6 @@ pub(crate) fn get_key() -> KeyEvent { } 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. - !windows_os || std::io::stdin().is_tty() + cfg!(not(windows)) || std::io::stdin().is_tty() } -- 2.54.0