Deepsource lint compliance
This commit is contained in:
parent
599f760a94
commit
39218609ad
|
|
@ -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())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue