We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
process_unix
1 parent f66e825 commit 22112e4Copy full SHA for 22112e4
library/std/src/sys/unix/process/process_unix.rs
@@ -552,8 +552,7 @@ impl Process {
552
use crate::os::unix::io::FromRawFd;
553
use crate::sys_common::FromInner;
554
// Safety: If `pidfd` is nonnegative, we assume it's valid and otherwise unowned.
555
- let pidfd = (pidfd >= 0)
556
- .then(|| PidFd::from_inner(unsafe { sys::fd::FileDesc::from_raw_fd(pidfd) }));
+ let pidfd = (pidfd >= 0).then(|| PidFd::from_inner(sys::fd::FileDesc::from_raw_fd(pidfd)));
557
Process { pid, status: None, pidfd }
558
}
559
0 commit comments