From 2709b7fb10dee8960857557e2691e9367eb8e98d Mon Sep 17 00:00:00 2001 From: Sean Young Date: Sat, 2 Mar 2024 09:25:24 +0000 Subject: [PATCH] Update aya to 0.12 Signed-off-by: Sean Young --- Cargo.toml | 4 ++-- irp/tests/tests.rs | 2 +- irp/tests/transmogrifier_compare/Cargo.toml | 2 +- src/bin/cir.rs | 4 ++-- src/lirc.rs | 4 ++++ 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a85dd390..da071533 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,10 +18,10 @@ itertools = "0.12" evdev = "0.12.1" mio = { version = "0.8", features = [ "os-poll", "os-ext" ] } libc = "0.2" -nix = { version = "0.27", features = [ "fs", "ioctl" ] } +nix = { version = "0.28", features = [ "fs", "ioctl" ] } regex = "1" humantime = "2.1" -aya = "0.11" +aya = "0.12" bitflags = "2.3" num-integer = "0.1" terminal_size = "0.3" diff --git a/irp/tests/tests.rs b/irp/tests/tests.rs index 68d21bdd..bcd139e5 100644 --- a/irp/tests/tests.rs +++ b/irp/tests/tests.rs @@ -647,7 +647,7 @@ fn arithmetic_in_bitspec() { let irp = Irp::parse("{.0k}<2,-3||-1>(1m,-100m)"); - assert_eq!(irp.err(), Some("parse error at error at 1:11: expected one of \",\", \".\", \">\", \"m\", \"p\", \"u\", ['0' ..= '9']".into())); + assert_eq!(irp.err(), Some("parse error at error at 1:11: expected one of \",\", \".\", \">\", \"m\", \"p\", \"u\", ['0'..='9']".into())); let irp = Irp::parse("{100}<>(1,-2,2u,-100m)").unwrap(); diff --git a/irp/tests/transmogrifier_compare/Cargo.toml b/irp/tests/transmogrifier_compare/Cargo.toml index 39ca0720..c8de4185 100644 --- a/irp/tests/transmogrifier_compare/Cargo.toml +++ b/irp/tests/transmogrifier_compare/Cargo.toml @@ -8,6 +8,6 @@ publish = false irp = { path = "../.." } irptransmogrifier = { path = "../rust-irptransmogrifier" } rand = "0.8" -itertools = "0.11" +itertools = "0.12" [workspace] diff --git a/src/bin/cir.rs b/src/bin/cir.rs index dccdaec1..6d22fd12 100644 --- a/src/bin/cir.rs +++ b/src/bin/cir.rs @@ -4,7 +4,7 @@ use clap::{Arg, ArgGroup, Command}; use evdev::Device; use itertools::Itertools; use log::{Level, LevelFilter, Metadata, Record}; -use std::{convert::TryInto, os::unix::io::AsRawFd, path::PathBuf}; +use std::{convert::TryInto, path::PathBuf}; mod commands; @@ -612,7 +612,7 @@ fn print_rc_dev(list: &[rcdev::Rcdev], matches: &clap::ArgMatches) { } ); - match LircMode2::query(lircdev.as_raw_fd()) { + match LircMode2::query(lircdev.as_file()) { Ok(list) => { print!("\tBPF protocols\t\t: "); diff --git a/src/lirc.rs b/src/lirc.rs index b5a3bffd..5f99a84e 100644 --- a/src/lirc.rs +++ b/src/lirc.rs @@ -449,6 +449,10 @@ impl Lirc { Ok(res) } + + pub fn as_file(&self) -> &File { + &self.file + } } impl AsRawFd for Lirc {