Skip to content

Commit 85a673f

Browse files
committed
nits: doc comment, const_io_error
1 parent 714aa3c commit 85a673f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/std/src/sys/unix/fs/dir_fd.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ mod remove_dir_all_xat {
138138
/// It is only `Fd(None)` temporarily in `ensure_open()`.
139139
Fd(Option<OwnedFd>),
140140

141-
// Contains the `ReadDir` for the directory while it is being read. The ReadDir does not contain
142-
// a valid `root` path, because it is not needed. It also contains the file descriptor of the
143-
// directory to avoid calls to dirfd(3).
141+
/// Contains the `ReadDir` for the directory while it is being read. The ReadDir does not contain
142+
/// a valid `root` path, because it is not needed. It also contains the file descriptor of the
143+
/// directory to avoid calls to dirfd(3).
144144
OpenReadDir(ReadDir, BorrowedFd<'a>),
145145
}
146146

@@ -247,7 +247,7 @@ mod remove_dir_all_xat {
247247
// Make sure that the reopened directory has the same inode as when we visited it descending
248248
// the directory tree.
249249
if self.dev != stat.st_dev || self.ino != stat.st_ino {
250-
return Err(io::Error::new(
250+
return Err(io::const_io_error!(
251251
io::ErrorKind::Uncategorized,
252252
"directory with unexpected dev/inode pair",
253253
));

0 commit comments

Comments
 (0)