Deepsource lint compliance

This commit is contained in:
Aiden Ghim 2026-04-06 20:02:43 +09:00
parent 599f760a94
commit 39218609ad
2 changed files with 2 additions and 2 deletions

View File

@ -62,5 +62,5 @@ pub fn resolve_symlinks() -> bool {
}
pub fn get_home_dir() -> OsString {
env::var_os("HOME").unwrap_or("".into())
env::var_os("HOME").unwrap_or_else(|| "".into())
}

View File

@ -163,7 +163,7 @@ fn expand_home_dir(path: &str) -> String {
return path.to_string();
}
match path.strip_prefix("~") {
match path.strip_prefix('~') {
Some(path) => {
format!("{}{}", home.to_str().expect("cannot convert OsString to &str"), path)
}