From d8d60c9b340c0386f2cc52ee0192a008afa95e61 Mon Sep 17 00:00:00 2001 From: Jan Niehusmann Date: Sun, 23 Aug 2026 20:24:16 +0000 Subject: [PATCH] Update nix to 0.31.3, spidev to 0.7.1 --- CHANGELOG.md | 2 ++ Cargo.toml | 4 ++-- src/i2c.rs | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e48a07..b3c02eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - MSRV is now 1.85.0. - Set `resolver = "3"`, which implies `resolver.incompatible-rust-versions = "fallback"` +- Updated to `nix` `0.31.3` +- Updated to `spidev` `0.7.1` ### Added diff --git a/Cargo.toml b/Cargo.toml index 9cf5ea3..3b171f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,8 +33,8 @@ sysfs_gpio = { version = "0.6.1", optional = true } i2cdev = { version = "0.6.0", optional = true } nb = "1" serialport = { version = "4.2.0", default-features = false, optional = true } -spidev = { version = "0.6.1", optional = true } -nix = { version = "0.27.1", optional = true } +spidev = { version = "0.7.1", optional = true } +nix = { version = "0.31.3", optional = true } tokio = { version = "1", default-features = false, optional = true } [dev-dependencies] diff --git a/src/i2c.rs b/src/i2c.rs index 854b39a..d933dd1 100644 --- a/src/i2c.rs +++ b/src/i2c.rs @@ -138,9 +138,9 @@ impl embedded_hal::i2c::Error for I2CError { use nix::errno::Errno::*; let errno = match &self.err { - i2cdev::linux::LinuxI2CError::Errno(e) => nix::Error::from_i32(*e), + i2cdev::linux::LinuxI2CError::Errno(e) => nix::Error::from_raw(*e), i2cdev::linux::LinuxI2CError::Io(e) => match e.raw_os_error() { - Some(r) => nix::Error::from_i32(r), + Some(r) => nix::Error::from_raw(r), None => return ErrorKind::Other, }, };