From 9199d17ccc2345e2ed7bc8b709d8c40010945762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20M=2E=20Rodr=C3=ADguez?= Date: Tue, 29 Aug 2023 19:36:17 +0200 Subject: [PATCH] Bump cargo dependencies (#160) * Bump dev-dependencies * Bump dependencies * Bump more dependencies * Apply fmt and clippy * Apply fmt and clippy * Apply fmt and clippy --- crates/lillinput-cli/Cargo.toml | 19 ++++++++--------- crates/lillinput-cli/src/settings.rs | 4 ++-- crates/lillinput/Cargo.toml | 21 +++++++++---------- crates/lillinput/src/actions/i3action.rs | 10 ++++----- .../src/controllers/defaultcontroller.rs | 2 +- crates/lillinput/src/events/mod.rs | 3 +-- 6 files changed, 28 insertions(+), 31 deletions(-) diff --git a/crates/lillinput-cli/Cargo.toml b/crates/lillinput-cli/Cargo.toml index c8db84c..9a6147e 100644 --- a/crates/lillinput-cli/Cargo.toml +++ b/crates/lillinput-cli/Cargo.toml @@ -12,16 +12,15 @@ categories = ["command-line-utilities", "gui"] [dependencies] clap = { version = "~3.2.17", features = ["derive"] } clap-verbosity-flag = "~1.0.1" -config = "~0.13.2" -i3ipc = "~0.10" +config = "0.13" +i3ipc = "0.10" lillinput = { path = "../lillinput", version = "0.3.0" } -log = { version = "~0.4.17", features = ["serde"] } -serde = { version = "~1.0", features = ["derive"] } -simplelog = "~0.12.0" -strum = { version = "~0.24", features = ["derive"] } -strum_macros = "~0.24" -xdg = "~2.4" +log = { version = "0.4.20", features = ["serde"] } +serde = { version = "1.0", features = ["derive"] } +simplelog = "0.12" +strum = { version = "0.25", features = ["derive"] } +xdg = "2.5" [dev-dependencies] -tempfile = "~3.3" -serial_test = "~0.9.0" +tempfile = "3.8" +serial_test = "2.0" diff --git a/crates/lillinput-cli/src/settings.rs b/crates/lillinput-cli/src/settings.rs index 04552cf..5068fe0 100644 --- a/crates/lillinput-cli/src/settings.rs +++ b/crates/lillinput-cli/src/settings.rs @@ -198,7 +198,7 @@ pub fn setup_application(opts: Opts, initialize_logging: bool) -> Result> = vec![]; - for value in arguments.iter() { + for value in arguments { // Create the new actions. match ActionType::from_str(&value.type_) { Ok(ActionType::Command) => { diff --git a/crates/lillinput/Cargo.toml b/crates/lillinput/Cargo.toml index f4362aa..9f85d7d 100644 --- a/crates/lillinput/Cargo.toml +++ b/crates/lillinput/Cargo.toml @@ -10,17 +10,16 @@ keywords = ["i3", "touchpad", "x11", "libinput", "gestures"] categories = ["command-line-utilities", "gui"] [dependencies] -filedescriptor = "~0.8" -i3ipc = "~0.10" +filedescriptor = "0.8" +i3ipc = "0.10" input = "~0.7" -itertools = "~0.10" -libc = "~0.2" -log = { version = "~0.4.17" } -shlex = "~1.1" -strum = { version = "~0.24", features = ["derive"] } -strum_macros = "~0.24" -thiserror = "~1.0" +itertools = "0.11" +libc = "0.2" +log = { version = "0.4.20" } +shlex = "1.1" +strum = { version = "0.25", features = ["derive"] } +thiserror = "1.0" [dev-dependencies] -tempfile = "~3.3" -serial_test = "~0.9.0" +tempfile = "3.8" +serial_test = "2.0" diff --git a/crates/lillinput/src/actions/i3action.rs b/crates/lillinput/src/actions/i3action.rs index 1c76026..6cbb8a8 100644 --- a/crates/lillinput/src/actions/i3action.rs +++ b/crates/lillinput/src/actions/i3action.rs @@ -44,11 +44,11 @@ impl Action for I3Action { // Check if the i3 connection is valid. let Some(connection) = connection_option else { - return Err(ActionError::ExecutionError { - type_: "i3".into(), - message: "i3 connection is not set".into(), - }) - }; + return Err(ActionError::ExecutionError { + type_: "i3".into(), + message: "i3 connection is not set".into(), + }); + }; match connection.run_command(&self.command) { Err(e) => Err(ActionError::ExecutionError { diff --git a/crates/lillinput/src/controllers/defaultcontroller.rs b/crates/lillinput/src/controllers/defaultcontroller.rs index e2aa21f..0bd5374 100644 --- a/crates/lillinput/src/controllers/defaultcontroller.rs +++ b/crates/lillinput/src/controllers/defaultcontroller.rs @@ -88,7 +88,7 @@ impl Controller for DefaultController { actions.len() ); - for action in actions.iter_mut() { + for action in &mut *actions { match action.execute_command() { Ok(_) => (), Err(e) => warn!("Error execution action {action}: {e}"), diff --git a/crates/lillinput/src/events/mod.rs b/crates/lillinput/src/events/mod.rs index d2f9db4..7123484 100644 --- a/crates/lillinput/src/events/mod.rs +++ b/crates/lillinput/src/events/mod.rs @@ -8,8 +8,7 @@ pub use crate::events::defaultprocessor::DefaultProcessor; pub use crate::events::errors::{LibinputError, ProcessorError}; use input::event::GestureEvent; -use strum::{Display, EnumString, EnumVariantNames}; -use strum_macros::EnumIter; +use strum::{Display, EnumIter, EnumString, EnumVariantNames}; /// High-level application events that can trigger an action. #[derive(