We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a622bba commit 54c4a42Copy full SHA for 54c4a42
1 file changed
src/fs/iter.rs
@@ -70,15 +70,15 @@ impl ReadDir {
70
// We use this length to index to get the filename (store full path -> index to get filename)
71
72
// 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");
+ let fd = unsafe { FileDes(libc::dirfd(dir.as_ptr())) };
+ debug_assert!(fd.is_open(), "We expect it to be open");
75
76
Ok(Self {
77
dir,
78
path_buffer,
79
file_name_index,
80
parent_depth: dir_path.depth, //inherit depth
81
- fd: dirfd,
+ fd,
82
})
83
}
84
0 commit comments