Skip to content

Commit 54c4a42

Browse files
committed
refactor: iter.rs could be made cleaner
1 parent a622bba commit 54c4a42

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/fs/iter.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ impl ReadDir {
7070
// We use this length to index to get the filename (store full path -> index to get filename)
7171

7272
// SAFETY: dir is a non null pointer,the pointer is guaranteed to be valid
73-
let dirfd = unsafe { FileDes(libc::dirfd(dir.as_ptr())) };
74-
debug_assert!(dirfd.is_open(), "We expect it to be open");
73+
let fd = unsafe { FileDes(libc::dirfd(dir.as_ptr())) };
74+
debug_assert!(fd.is_open(), "We expect it to be open");
7575

7676
Ok(Self {
7777
dir,
7878
path_buffer,
7979
file_name_index,
8080
parent_depth: dir_path.depth, //inherit depth
81-
fd: dirfd,
81+
fd,
8282
})
8383
}
8484
}

0 commit comments

Comments
 (0)