summaryrefslogtreecommitdiff
path: root/runtime/errors.rs
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2021-09-02 23:38:44 +0200
committerGitHub <noreply@github.com>2021-09-02 23:38:44 +0200
commit1bf7b90ca8ad8e2bf62e455c24d5498c9ee74a46 (patch)
treee92ed4d8cce51a38d8e728e5d4108edca018231d /runtime/errors.rs
parentc84532b6d5a424694c519260f0cf407b1d8ba604 (diff)
chore: update dependencies (#11856)
Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'runtime/errors.rs')
-rw-r--r--runtime/errors.rs21
1 files changed, 9 insertions, 12 deletions
diff --git a/runtime/errors.rs b/runtime/errors.rs
index db14bd8bf..f88455b05 100644
--- a/runtime/errors.rs
+++ b/runtime/errors.rs
@@ -138,19 +138,16 @@ fn get_hyper_error_class(_error: &hyper::Error) -> &'static str {
#[cfg(unix)]
fn get_nix_error_class(error: &nix::Error) -> &'static str {
- use nix::errno::Errno::*;
match error {
- nix::Error::Sys(ECHILD) => "NotFound",
- nix::Error::Sys(EINVAL) => "TypeError",
- nix::Error::Sys(ENOENT) => "NotFound",
- nix::Error::Sys(ENOTTY) => "BadResource",
- nix::Error::Sys(EPERM) => "PermissionDenied",
- nix::Error::Sys(ESRCH) => "NotFound",
- nix::Error::Sys(UnknownErrno) => "Error",
- nix::Error::Sys(_) => "Error",
- nix::Error::InvalidPath => "TypeError",
- nix::Error::InvalidUtf8 => "InvalidData",
- nix::Error::UnsupportedOperation => unreachable!(),
+ nix::Error::ECHILD => "NotFound",
+ nix::Error::EINVAL => "TypeError",
+ nix::Error::ENOENT => "NotFound",
+ nix::Error::ENOTTY => "BadResource",
+ nix::Error::EPERM => "PermissionDenied",
+ nix::Error::ESRCH => "NotFound",
+ nix::Error::UnknownErrno => "Error",
+ &nix::Error::ENOTSUP => unreachable!(),
+ _ => "Error",
}
}