aboutsummaryrefslogtreecommitdiffstats
path: root/src/wait/child.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/wait/child.rs')
-rw-r--r--src/wait/child.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wait/child.rs b/src/wait/child.rs
index 29a7d70..8859eb4 100644
--- a/src/wait/child.rs
+++ b/src/wait/child.rs
@@ -33,7 +33,7 @@ impl ChildWaiter {
pub fn new(child: Child) -> io::Result<Self> {
let fd = unsafe { syscall(SYS_pidfd_open, child.id(), 0) };
if fd < 0 {
- Err(io::Error::new(io::ErrorKind::Other, PidFdOpenError))
+ Err(io::Error::other(PidFdOpenError))
} else {
let fd = fd as RawFd;
Ok(Self { child, fd })