Skip to content

Commit

Permalink
style(utils): clippy suggested docs improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
gibfahn committed Sep 20, 2024
1 parent dc03b1f commit 8e2f19f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/utils/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,13 @@ pub fn to_utf8_path(path: &std::path::Path) -> Result<&Utf8Path> {
Utf8Path::from_path(path).ok_or_else(|| eyre!("Invalid UTF-8 in path {path:?}"))
}

/// Remove a broken symlink. You can normally check for a broken symlink with:
/// `!path.exists() && path.symlink_metadata().is_ok()`
/// This checks that the path pointed to doesn't exist, but that the symlink does exist.
/**
Remove a broken symlink.
You can normally check for a broken symlink with:
`!path.exists() && path.symlink_metadata().is_ok()`
This checks that the path pointed to doesn't exist, but that the symlink does exist.
*/
pub fn remove_broken_symlink(path: &Utf8Path) -> Result<(), UpError> {
warn!(
"Removing existing broken symlink.\n Path: {path}\n Dest: {dest}",
Expand Down

0 comments on commit 8e2f19f

Please sign in to comment.