Fix multiple warnings

This commit is contained in:
Denis Benato
2025-10-08 01:19:38 +02:00
parent b2e7211bbe
commit 09dcfb4065
11 changed files with 140 additions and 127 deletions

View File

@@ -1171,9 +1171,9 @@ fn print_firmware_attr(attr: &AsusArmouryProxyBlocking) -> Result<(), Box<dyn st
fn handle_armoury_command(cmd: &ArmouryCommand) -> Result<(), Box<dyn std::error::Error>> {
{
if cmd.free.is_empty() || cmd.free.len() % 2 != 0 || cmd.help {
if cmd.free.is_empty() || !cmd.free.len().is_multiple_of(2) || cmd.help {
const USAGE: &str = "Usage: asusctl platform panel_overdrive 1 nv_dynamic_boost 5";
if cmd.free.len() % 2 != 0 {
if !cmd.free.len().is_multiple_of(2) {
println!(
"Incorrect number of args, each attribute label must be paired with a setting:"
);