From b66d6dffcf6437da6d350c31d1991ff3cd58784d Mon Sep 17 00:00:00 2001 From: Krysztal112233 Date: Thu, 21 Mar 2024 23:53:32 +0800 Subject: [PATCH] lint: fix `clippy::needless_borrows_for_generic_args` in `perms.rs` --- src/uucore/src/lib/features/perms.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uucore/src/lib/features/perms.rs b/src/uucore/src/lib/features/perms.rs index 54372f495..c94b80b11 100644 --- a/src/uucore/src/lib/features/perms.rs +++ b/src/uucore/src/lib/features/perms.rs @@ -685,7 +685,7 @@ mod tests { fn test_symlink_slash() { let temp_dir = tempdir().unwrap(); let symlink_path = temp_dir.path().join("symlink"); - unix::fs::symlink(&PathBuf::from("/"), &symlink_path).unwrap(); + unix::fs::symlink(PathBuf::from("/"), &symlink_path).unwrap(); let symlink_path_slash = temp_dir.path().join("symlink/"); // Must return true, we're about to "accidentally" recurse on "/", // since "symlink/" always counts as an already-entered directory @@ -708,7 +708,7 @@ mod tests { // This covers both the commandline-argument case and the recursion case. let temp_dir = tempdir().unwrap(); let symlink_path = temp_dir.path().join("symlink"); - unix::fs::symlink(&PathBuf::from("/"), &symlink_path).unwrap(); + unix::fs::symlink(PathBuf::from("/"), &symlink_path).unwrap(); // Only return true we're about to "accidentally" recurse on "/". assert!(!is_root(&symlink_path, false)); assert!(is_root(&symlink_path, true));