Skip to content

Commit

Permalink
Bumped nix dependency to v0.29
Browse files Browse the repository at this point in the history
  • Loading branch information
fpagliughi committed Dec 10, 2024
1 parent 6e3a12d commit 365f0bc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ libiio_v0_19 = ["libiio-sys/libiio_v0_19"]
[dependencies]
libiio-sys = { version = "0.4.0-pre.0", path = "libiio-sys", default-features = false }
thiserror = "1.0"
nix = "0.26"
nix = "0.29"
clap = { version = "3.2", features = ["cargo"], optional = true }

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//!
use crate::{cstring_opt, ffi, sys_result, Device, Error, Result, Version};
use nix::errno::{self, Errno};
use nix::errno::Errno;
use std::{
ffi::{CStr, CString},
os::raw::{c_char, c_uint},
Expand Down Expand Up @@ -361,7 +361,7 @@ impl Context {
ffi::iio_context_get_attr(self.inner.ctx, idx as c_uint, &mut pname, &mut pval)
};
if ret < 0 {
return Err(errno::from_i32(ret).into());
return Err(Errno::from_raw(ret).into());
}
let name = cstring_opt(pname);
let val = cstring_opt(pval);
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ use std::{
};

use libiio_sys::{self as ffi};
use nix::errno;
use nix::errno::Errno;

pub use crate::buffer::{AttrIterator as BufferAttrIterator, Buffer};
pub use crate::channel::{
Expand Down Expand Up @@ -109,7 +109,7 @@ fn cstring_opt(pstr: *const c_char) -> Option<String> {

pub(crate) fn sys_result<T>(ret: i32, result: T) -> Result<T> {
if ret < 0 {
Err(errno::from_i32(-ret).into())
Err(Errno::from_raw(-ret).into())
}
else {
Ok(result)
Expand Down

0 comments on commit 365f0bc

Please sign in to comment.