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; }