Skip to content

Commit

Permalink
Merge pull request #292 from glittershark/bump-nix
Browse files Browse the repository at this point in the history
Bump nix version to 0.23.0
  • Loading branch information
blackbeam authored Oct 10, 2021
2 parents 4ce208d + eeed070 commit 654b7e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,4 @@ named_pipe = "~0.4"

[target.'cfg(unix)'.dependencies]
libc = "0.2"
nix = "0.21.0"

nix = "0.23.0"
7 changes: 2 additions & 5 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,8 @@ impl From<std::convert::Infallible> 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))
}
}

Expand Down

0 comments on commit 654b7e5

Please sign in to comment.