mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 18:23:49 +00:00
Rollup merge of #102036 - Patiga:remove-io-errorkind-other-use-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](https://github.com/rust-lang/rust/issues/82971).
This commit is contained in:
commit
c99a603b87
@ -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."))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user