diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f89b186a9..5d1dfa2d8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,7 +40,7 @@ repos: args: ["--severity=warning"] - repo: https://github.com/pre-commit/mirrors-clang-format - rev: 'v18.1.6' # Use the sha / tag you want to point at + rev: 'v19.1.0' # Use the sha / tag you want to point at hooks: - id: clang-format diff --git a/tool/src/main.rs b/tool/src/main.rs index 71090c78e..85b0ae995 100644 --- a/tool/src/main.rs +++ b/tool/src/main.rs @@ -311,7 +311,7 @@ fn main() { .subcommand(SubCommand::with_name("console")) .subcommand(SubCommand::with_name("fan") .arg(Arg::with_name("index") - .value_parser(clap::value_parser!(u8)) + .allow_invalid_utf8(true) .required(true) ) .arg(Arg::with_name("duty") @@ -456,7 +456,7 @@ fn main() { }, }, Some(("fan", sub_m)) => { - let index = sub_m.value_of("index").unwrap().parse::().unwrap(); + let index = sub_m.value_of_os("index").unwrap().to_string_lossy().parse::().unwrap(); let duty_opt = sub_m.value_of("duty").map(|x| x.parse::().unwrap()); match duty_opt { Some(duty) => match unsafe { fan_set(&mut ec, index, duty) } {