diff --git a/crates/cli/src/bin/codew_legacy_shim.rs b/crates/cli/src/bin/codew_legacy_shim.rs index 165e05a9..870128fb 100644 --- a/crates/cli/src/bin/codew_legacy_shim.rs +++ b/crates/cli/src/bin/codew_legacy_shim.rs @@ -37,12 +37,12 @@ fn spawn_codewhale(args: &[String]) -> std::io::Result // same directory as this shim but not on PATH (#2006). #[cfg(windows)] { - if let Ok(exe_path) = env::current_exe() { - if let Some(dir) = exe_path.parent() { - let sibling = dir.join("codewhale.exe"); - if sibling.is_file() { - return Command::new(sibling).args(args).status(); - } + if let Ok(exe_path) = env::current_exe() + && let Some(dir) = exe_path.parent() + { + let sibling = dir.join("codewhale.exe"); + if sibling.is_file() { + return Command::new(sibling).args(args).status(); } } } diff --git a/crates/cli/src/bin/deepseek_legacy_shim.rs b/crates/cli/src/bin/deepseek_legacy_shim.rs index b47c9d92..abd00896 100644 --- a/crates/cli/src/bin/deepseek_legacy_shim.rs +++ b/crates/cli/src/bin/deepseek_legacy_shim.rs @@ -44,12 +44,12 @@ fn spawn_codewhale(args: &[String]) -> std::io::Result // same directory as this shim but not on PATH (#2006). #[cfg(windows)] { - if let Ok(exe_path) = env::current_exe() { - if let Some(dir) = exe_path.parent() { - let sibling = dir.join("codewhale.exe"); - if sibling.is_file() { - return Command::new(sibling).args(args).status(); - } + if let Ok(exe_path) = env::current_exe() + && let Some(dir) = exe_path.parent() + { + let sibling = dir.join("codewhale.exe"); + if sibling.is_file() { + return Command::new(sibling).args(args).status(); } } } diff --git a/crates/tui/src/commands/config.rs b/crates/tui/src/commands/config.rs index 651b4d5d..36e300c1 100644 --- a/crates/tui/src/commands/config.rs +++ b/crates/tui/src/commands/config.rs @@ -473,9 +473,9 @@ pub fn set_config_value(app: &mut App, key: &str, value: &str, persist: bool) -> Err(err) => return CommandResult::error(format!("Failed to save: {err}")), } } - return CommandResult::error(format!( - "base_url must be saved with --save; client base URL is loaded from config on startup. Restart and re-open your session after saving." - )); + return CommandResult::error( + "base_url must be saved with --save; client base URL is loaded from config on startup. Restart and re-open your session after saving.", + ); } _ => {} } diff --git a/crates/tui/src/runtime_log.rs b/crates/tui/src/runtime_log.rs index 48373d4b..2edd53ad 100644 --- a/crates/tui/src/runtime_log.rs +++ b/crates/tui/src/runtime_log.rs @@ -174,7 +174,7 @@ fn log_directory() -> Option { { return resolve(userprofile); } - dirs::home_dir().and_then(|h| resolve(h)) + dirs::home_dir().and_then(resolve) } fn log_file_name(date: &str, pid: u32) -> String {