From fdfcd2c728975a6b0aaf1b2730f1e15a67bd6604 Mon Sep 17 00:00:00 2001 From: CUBELinux-2 Date: Thu, 20 Aug 2026 17:49:38 -0400 Subject: [PATCH] chore(cubesys): resolve 4 clippy -D warnings blocking the check gate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * commands.rs:819 — `cell.links().iter().copied().collect::>()` replaced with `cell.links().to_vec()` (clippy: "calling to_vec() is both faster and more readable"). * commands.rs:991 — `while let Some(tok) = it.next()` loop over metatag tokens rewritten as a direct `for tok in it` (clippy: "this loop could be written as a for loop"). * store.rs:699 — `put_code_cell` (8 args) annotated with `#[allow(clippy::too_many_arguments)]` (argument count is inherent to the code-cell put API; splitting would add indirection without benefit). * lib.rs:136 — `store_code_cell` (8 args) annotated identically; this is the shared implementation every front-end uses so the count cannot change without redesigning the record-codec bridge. Verification: ./check gate passes (fmt + tests + clippy -D warnings). Co-Authored-By: Hermes Agent --- cubesys/src/commands.rs | 4 ++-- cubesys/src/lib.rs | 1 + cubesys/src/store.rs | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cubesys/src/commands.rs b/cubesys/src/commands.rs index 27bbc91..3059332 100644 --- a/cubesys/src/commands.rs +++ b/cubesys/src/commands.rs @@ -816,7 +816,7 @@ impl Session { path, Kind::Kernel, cell.name().unwrap_or(path), - &cell.links().iter().copied().collect::>(), + cell.links(), &cell.code, None, None, @@ -988,7 +988,7 @@ impl Session { // Optional metatags: `doc_type=` and/or `title=` may // follow. These are what `query ` matches on. let mut header = CubeHeader::new(); - while let Some(tok) = it.next() { + for tok in it { if let Some(v) = tok.strip_prefix("doc_type=") { header.doc_type = Some(v.to_string()); } else if let Some(v) = tok.strip_prefix("title=") { diff --git a/cubesys/src/lib.rs b/cubesys/src/lib.rs index af6a962..e9e3e3f 100644 --- a/cubesys/src/lib.rs +++ b/cubesys/src/lib.rs @@ -133,6 +133,7 @@ pub fn load_code_cell( /// Build a [`CodeCell`] from parts and write it back as a record at `path`, /// so code written by the VM (or tooling) is visible to cubefs at that path. +#[allow(clippy::too_many_arguments)] pub fn store_code_cell( store: &mut CubeStore, path: &str, diff --git a/cubesys/src/store.rs b/cubesys/src/store.rs index 7d08451..c32b6e2 100644 --- a/cubesys/src/store.rs +++ b/cubesys/src/store.rs @@ -696,6 +696,7 @@ impl ConcurrentStore { /// Store a code cell at `path` (the path->code bridge), durability-logged. /// `owner` (when set) is stamped on the record's `owner_local_user` field /// so owner enforcement (Task 6) can later reject cross-owner overwrites. + #[allow(clippy::too_many_arguments)] pub fn put_code_cell( &self, path: &str,