Fix clippy lint

This commit is contained in:
Johannes Altmanninger 2024-03-23 14:13:30 +01:00
parent 58e477fab3
commit c209e6b5fb

View File

@ -267,7 +267,7 @@ pub fn wopen_dir(pathname: &wstr, mode: nix::sys::stat::Mode) -> nix::Result<Own
/// Narrow version of wopen_dir().
pub fn open_dir(path: &CStr, mode: nix::sys::stat::Mode) -> nix::Result<OwnedFd> {
open_cloexec(path, OFlag::O_RDONLY | OFlag::O_DIRECTORY, mode).map(|file| OwnedFd::from(file))
open_cloexec(path, OFlag::O_RDONLY | OFlag::O_DIRECTORY, mode).map(OwnedFd::from)
}
/// Close a file descriptor \p fd, retrying on EINTR.