Skip to content

Commit

Permalink
Rollup merge of rust-lang#102036 - Patiga:remove-io-errorkind-other-u…
Browse files Browse the repository at this point in the history
…se-in-std, r=Mark-Simulacrum

Remove use of `io::ErrorKind::Other` in std

The documentation states that this `ErrorKind` is not used by the standard library. Instead, `io::ErrorKind::Uncategorized` should be used.

The two instances are in the unstable API [linux_pidfd](rust-lang#82971).
  • Loading branch information
Dylan-DPC authored Sep 22, 2022
2 parents 626b02a + 04c1087 commit 0fb077a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/std/src/sys/unix/process/process_unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -822,14 +822,14 @@ impl crate::os::linux::process::ChildExt for crate::process::Child {
self.handle
.pidfd
.as_ref()
.ok_or_else(|| Error::new(ErrorKind::Other, "No pidfd was created."))
.ok_or_else(|| Error::new(ErrorKind::Uncategorized, "No pidfd was created."))
}

fn take_pidfd(&mut self) -> io::Result<PidFd> {
self.handle
.pidfd
.take()
.ok_or_else(|| Error::new(ErrorKind::Other, "No pidfd was created."))
.ok_or_else(|| Error::new(ErrorKind::Uncategorized, "No pidfd was created."))
}
}

Expand Down

0 comments on commit 0fb077a

Please sign in to comment.