summaryrefslogtreecommitdiff
path: root/test/test_unistd.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-07-11 02:19:59 +0000
committerGitHub <noreply@github.com>2022-07-11 02:19:59 +0000
commitb1b43725dff4a9cc71836f6b45c8b5f66c15abb5 (patch)
tree6ff46fce9125ab3b1d967f18665b511f6eb3aea8 /test/test_unistd.rs
parentd09c2972b76fd3fa4abcb93b2820bb11c022cd34 (diff)
parentdc1a34b864abc12bfef3de06b267d299298e01cb (diff)
downloadnix-b1b43725dff4a9cc71836f6b45c8b5f66c15abb5.zip
Merge #1757
1757: Clippy cleanup in the tests. r=rtzoeller a=asomers * Remove a redundant closure. Co-authored-by: Alan Somers <asomers@gmail.com>
Diffstat (limited to 'test/test_unistd.rs')
-rw-r--r--test/test_unistd.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_unistd.rs b/test/test_unistd.rs
index 23392834..38d31a3f 100644
--- a/test/test_unistd.rs
+++ b/test/test_unistd.rs
@@ -1169,6 +1169,8 @@ fn test_access_file_exists() {
assert!(access(&path, AccessFlags::R_OK | AccessFlags::W_OK).is_ok());
}
+//Clippy false positive https://github.com/rust-lang/rust-clippy/issues/9111
+#[allow(clippy::needless_borrow)]
#[cfg(not(target_os = "redox"))]
#[test]
fn test_user_into_passwd() {
@@ -1198,8 +1200,7 @@ fn test_setfsuid() {
// create a temporary file with permissions '-rw-r-----'
let file = tempfile::NamedTempFile::new_in("/var/tmp").unwrap();
let temp_path = file.into_temp_path();
- dbg!(&temp_path);
- let temp_path_2 = (&temp_path).to_path_buf();
+ let temp_path_2 = temp_path.to_path_buf();
let mut permissions = fs::metadata(&temp_path).unwrap().permissions();
permissions.set_mode(0o640);