Skip to content

Commit 01055f1

Browse files
committed
Remove an old MSRV workaround.
1 parent 0277184 commit 01055f1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cap-tempfile/src/tempfile.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,9 @@ fn new_tempfile_linux(d: &Dir, anonymous: bool) -> io::Result<Option<File>> {
7575
match rustix::fs::openat(d, ".", oflags, mode) {
7676
Ok(r) => Ok(Some(File::from(r))),
7777
// See <https://github.com/Stebalien/tempfile/blob/1a40687e06eb656044e3d2dffa1379f04b3ef3fd/src/file/imp/unix.rs#L81>
78-
// TODO: With newer Rust versions, this could be simplied to only write `Err` once.
79-
Err(rustix::io::Errno::OPNOTSUPP)
80-
| Err(rustix::io::Errno::ISDIR)
81-
| Err(rustix::io::Errno::NOENT) => Ok(None),
78+
Err(rustix::io::Errno::OPNOTSUPP | rustix::io::Errno::ISDIR | rustix::io::Errno::NOENT) => {
79+
Ok(None)
80+
}
8281
Err(e) => Err(e.into()),
8382
}
8483
}

0 commit comments

Comments
 (0)