Skip to content

Commit 9e6d178

Browse files
committed
Update nix dependency
1 parent f59e04d commit 9e6d178

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Provides API for safe access to Linux i2c device interface.
1818
libc = "0.2"
1919
bitflags = "1"
2020
byteorder = "1"
21-
nix = "0.14"
21+
nix = "0.22"
2222

2323
[dev-dependencies]
2424
docopt = "1"

src/linux.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@ impl From<LinuxI2CError> for io::Error {
5757
fn from(e: LinuxI2CError) -> io::Error {
5858
match e {
5959
LinuxI2CError::Io(e) => e,
60-
LinuxI2CError::Nix(e) => match e {
61-
nix::Error::Sys(e) => io::Error::from_raw_os_error(e as i32),
62-
e => io::Error::new(io::ErrorKind::InvalidInput, format!("{:?}", e)),
63-
},
60+
LinuxI2CError::Nix(e) => e.into(),
6461
}
6562
}
6663
}

0 commit comments

Comments
 (0)