diff --git a/Cargo.toml b/Cargo.toml index 2d0317c..71c3220 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,5 +53,4 @@ named_pipe = "~0.4" [target.'cfg(unix)'.dependencies] libc = "0.2" -nix = "0.21.0" - +nix = "0.23.0" diff --git a/src/error.rs b/src/error.rs index df164eb..17c7ebe 100644 --- a/src/error.rs +++ b/src/error.rs @@ -165,11 +165,8 @@ impl From for Error { #[cfg(unix)] impl From<::nix::Error> for Error { - fn from(x: ::nix::Error) -> Error { - match x { - ::nix::Error::Sys(errno) => Error::from(io::Error::from_raw_os_error(errno as i32)), - _ => Error::from(io::Error::new(io::ErrorKind::Other, x)), - } + fn from(errno: ::nix::Error) -> Error { + Error::from(io::Error::from_raw_os_error(errno as i32)) } }