style: satisfy current clippy lints

This commit is contained in:
Nightt
2026-05-27 18:48:29 +08:00
committed by Hunter Bown
parent 9edd2008c4
commit b0e7b67386
4 changed files with 16 additions and 16 deletions
+6 -6
View File
@@ -37,12 +37,12 @@ fn spawn_codewhale(args: &[String]) -> std::io::Result<std::process::ExitStatus>
// 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();
}
}
}
+6 -6
View File
@@ -44,12 +44,12 @@ fn spawn_codewhale(args: &[String]) -> std::io::Result<std::process::ExitStatus>
// 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();
}
}
}
+3 -3
View File
@@ -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.",
);
}
_ => {}
}
+1 -1
View File
@@ -174,7 +174,7 @@ fn log_directory() -> Option<PathBuf> {
{
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 {