From ad9b945d5d5495d8d70b26011bb0e9b0d5a1a237 Mon Sep 17 00:00:00 2001 From: xli-oai Date: Sat, 25 Apr 2026 11:25:40 -0700 Subject: [PATCH] Fix Windows PowerShell clippy lint --- codex-rs/shell-command/src/powershell.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/codex-rs/shell-command/src/powershell.rs b/codex-rs/shell-command/src/powershell.rs index c9ee0cfda2..30cb69526a 100644 --- a/codex-rs/shell-command/src/powershell.rs +++ b/codex-rs/shell-command/src/powershell.rs @@ -182,11 +182,7 @@ fn quote_argument(arg: &str) -> String { #[cfg(windows)] #[allow(dead_code)] pub(crate) fn try_find_powershellish_executable_blocking() -> Option { - if let Some(pwsh_path) = try_find_pwsh_executable_blocking() { - Some(pwsh_path) - } else { - try_find_powershell_executable_blocking() - } + try_find_pwsh_executable_blocking().or_else(try_find_powershell_executable_blocking) } /// This function attempts to find a powershell.exe executable on the system.