From 1bf7b90ca8ad8e2bf62e455c24d5498c9ee74a46 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Thu, 2 Sep 2021 23:38:44 +0200 Subject: chore: update dependencies (#11856) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bartek IwaƄczuk --- runtime/errors.rs | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'runtime/errors.rs') 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", } } -- cgit v1.2.3