Skip to content

Commit 58f9994

Browse files
committed
Run a round of clippy to fix CI
Signed-off-by: Alex Saveau <[email protected]>
1 parent 1783326 commit 58f9994

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

test/test_dir.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn flags() -> OFlag {
1919
#[allow(clippy::unnecessary_sort_by)] // False positive
2020
fn read() {
2121
let tmp = tempdir().unwrap();
22-
File::create(&tmp.path().join("foo")).unwrap();
22+
File::create(tmp.path().join("foo")).unwrap();
2323
std::os::unix::fs::symlink("foo", tmp.path().join("bar")).unwrap();
2424
let mut dir = Dir::open(tmp.path(), flags(), Mode::empty()).unwrap();
2525
let mut entries: Vec<_> = dir.iter().map(|e| e.unwrap()).collect();

test/test_fcntl.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ fn test_renameat() {
6464
let old_dirfd =
6565
open(old_dir.path(), OFlag::empty(), Mode::empty()).unwrap();
6666
let old_path = old_dir.path().join("old");
67-
File::create(&old_path).unwrap();
67+
File::create(old_path).unwrap();
6868
let new_dir = tempfile::tempdir().unwrap();
6969
let new_dirfd =
7070
open(new_dir.path(), OFlag::empty(), Mode::empty()).unwrap();
@@ -94,7 +94,7 @@ fn test_renameat2_behaves_like_renameat_with_no_flags() {
9494
let old_dirfd =
9595
open(old_dir.path(), OFlag::empty(), Mode::empty()).unwrap();
9696
let old_path = old_dir.path().join("old");
97-
File::create(&old_path).unwrap();
97+
File::create(old_path).unwrap();
9898
let new_dir = tempfile::tempdir().unwrap();
9999
let new_dirfd =
100100
open(new_dir.path(), OFlag::empty(), Mode::empty()).unwrap();
@@ -186,12 +186,12 @@ fn test_renameat2_noreplace() {
186186
let old_dirfd =
187187
open(old_dir.path(), OFlag::empty(), Mode::empty()).unwrap();
188188
let old_path = old_dir.path().join("old");
189-
File::create(&old_path).unwrap();
189+
File::create(old_path).unwrap();
190190
let new_dir = tempfile::tempdir().unwrap();
191191
let new_dirfd =
192192
open(new_dir.path(), OFlag::empty(), Mode::empty()).unwrap();
193193
let new_path = new_dir.path().join("new");
194-
File::create(&new_path).unwrap();
194+
File::create(new_path).unwrap();
195195
assert_eq!(
196196
renameat2(
197197
Some(old_dirfd),

test/test_kmod/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ fn compile_kernel_module() -> (PathBuf, String, TempDir) {
1212

1313
copy(
1414
"test/test_kmod/hello_mod/hello.c",
15-
&tmp_dir.path().join("hello.c"),
15+
tmp_dir.path().join("hello.c"),
1616
)
1717
.expect("unable to copy hello.c to temporary build directory");
1818
copy(
1919
"test/test_kmod/hello_mod/Makefile",
20-
&tmp_dir.path().join("Makefile"),
20+
tmp_dir.path().join("Makefile"),
2121
)
2222
.expect("unable to copy Makefile to temporary build directory");
2323

test/test_unistd.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ fn test_linkat_file() {
903903
let newfilepath = tempdir.path().join(newfilename);
904904

905905
// Create file
906-
File::create(&oldfilepath).unwrap();
906+
File::create(oldfilepath).unwrap();
907907

908908
// Get file descriptor for base directory
909909
let dirfd =
@@ -936,7 +936,7 @@ fn test_linkat_olddirfd_none() {
936936
let newfilepath = tempdir_newfile.path().join(newfilename);
937937

938938
// Create file
939-
File::create(&oldfilepath).unwrap();
939+
File::create(oldfilepath).unwrap();
940940

941941
// Get file descriptor for base directory of new file
942942
let dirfd = fcntl::open(
@@ -973,7 +973,7 @@ fn test_linkat_newdirfd_none() {
973973
let newfilepath = tempdir_newfile.path().join(newfilename);
974974

975975
// Create file
976-
File::create(&oldfilepath).unwrap();
976+
File::create(oldfilepath).unwrap();
977977

978978
// Get file descriptor for base directory of old file
979979
let dirfd = fcntl::open(
@@ -1101,7 +1101,7 @@ fn test_unlinkat_dir_noremovedir() {
11011101
let dirpath = tempdir.path().join(dirname);
11021102

11031103
// Create dir
1104-
DirBuilder::new().recursive(true).create(&dirpath).unwrap();
1104+
DirBuilder::new().recursive(true).create(dirpath).unwrap();
11051105

11061106
// Get file descriptor for base directory
11071107
let dirfd =

0 commit comments

Comments
 (0)