Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
flexatone committed Jan 8, 2025
1 parent 6584e64 commit 638b9b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub(crate) fn path_normalize(path: &Path) -> ResultDynError<PathBuf> {
let mut fp = path.to_path_buf();
if let Some(path_str) = fp.to_str() {
if path_str.starts_with('~') {
let home = path_home().ok_or_else(|| "Cannot get home directory")?;
let home = path_home().ok_or("Cannot get home directory")?;
let path_stripped =
fp.strip_prefix("~").map_err(|_| "Failed to strip prefix")?;
fp = home.join(path_stripped);
Expand Down

0 comments on commit 638b9b6

Please sign in to comment.