From 8e2f19f9c60ce5505e957dcb3c0f6b4acff74635 Mon Sep 17 00:00:00 2001 From: Gibson Fahnestock Date: Fri, 20 Sep 2024 12:38:46 +0100 Subject: [PATCH] style(utils): clippy suggested docs improvement --- src/utils/files.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/utils/files.rs b/src/utils/files.rs index 2c9ebe7..945db97 100644 --- a/src/utils/files.rs +++ b/src/utils/files.rs @@ -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}",