mirror of
https://github.com/uutils/coreutils
synced 2024-12-13 23:02:38 +00:00
lint: fix clippy::needless_borrows_for_generic_args
in perms.rs
This commit is contained in:
parent
72b7266f71
commit
b66d6dffcf
1 changed files with 2 additions and 2 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue