From 5f40614d2da94d41ff4e0e9efb17f58a2ef878a2 Mon Sep 17 00:00:00 2001 From: Avi Fenesh Date: Wed, 29 Jul 2026 09:55:07 +0300 Subject: [PATCH] fix(ferriskey): clear two clippy lib errors blocking every matrix job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cargo clippy -D warnings fails on main in the ferriskey lib, which takes down all three clippy invocations in matrix.yml / release.yml (the scoped workspace job compiles ferriskey as a dependency, so it fails there too) and with it every `valkey N ยท standalone|cluster` matrix leg. cluster/routing.rs:552 clippy::for_kv_map `for (_, arg_indices) in routes.iter_mut()` -> `routes.values_mut()` cmd.rs:74 clippy::question_mark collapse the if-let/else-return into `self.cmd.cursor?`; next_item already returns Option and uses `?` further down, so this is the idiom the surrounding code already follows Pre-existing debt, not a regression: verified identical failures on a clean checkout of main at 0def596 with no local changes. Verified all three CI clippy invocations now exit 0: cargo clippy -p ff-core -p ff-script -p ff-engine -p ff-scheduler \ -p ff-sdk -p ff-server -p ff-test -p ff-backend-sqlite \ --features ff-sdk/direct-valkey-claim -- -D warnings cargo clippy -p ferriskey --all-targets -- -D warnings cargo clippy -p ferriskey --all-targets --features iam -- -D warnings --- ferriskey/src/cluster/routing.rs | 2 +- ferriskey/src/cmd.rs | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ferriskey/src/cluster/routing.rs b/ferriskey/src/cluster/routing.rs index 56d0eba8..a73b4396 100644 --- a/ferriskey/src/cluster/routing.rs +++ b/ferriskey/src/cluster/routing.rs @@ -549,7 +549,7 @@ where { // Last key reached; add the path argument index for each route and break let path_idx = curr_arg_idx + 1; - for (_, arg_indices) in routes.iter_mut() { + for arg_indices in routes.values_mut() { arg_indices.push(path_idx); } break; diff --git a/ferriskey/src/cmd.rs b/ferriskey/src/cmd.rs index f81785fb..d015378c 100644 --- a/ferriskey/src/cmd.rs +++ b/ferriskey/src/cmd.rs @@ -71,11 +71,8 @@ impl<'a, T: FromValue + 'a, C: AsyncConnection + Send + 'a> AsyncIterInner<'a, T if let Some(v) = self.batch.next() { return Some(v); }; - if let Some(cursor) = self.cmd.cursor { - if cursor == 0 { - return None; - } - } else { + let cursor = self.cmd.cursor?; + if cursor == 0 { return None; }