chore(cubesys): resolve 4 clippy -D warnings blocking the check gate
* commands.rs:819 — `cell.links().iter().copied().collect::<Vec<_>>()` 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
This commit is contained in:
co-authored by
Hermes Agent
parent
90e90ef926
commit
fdfcd2c728
@@ -816,7 +816,7 @@ impl Session {
|
||||
path,
|
||||
Kind::Kernel,
|
||||
cell.name().unwrap_or(path),
|
||||
&cell.links().iter().copied().collect::<Vec<_>>(),
|
||||
cell.links(),
|
||||
&cell.code,
|
||||
None,
|
||||
None,
|
||||
@@ -988,7 +988,7 @@ impl Session {
|
||||
// Optional metatags: `doc_type=<t>` and/or `title=<t>` may
|
||||
// follow. These are what `query <doc_type>` 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=") {
|
||||
|
||||
@@ -133,6 +133,7 @@ pub fn load_code_cell<B: CubeBackend>(
|
||||
|
||||
/// 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<B: CubeBackend>(
|
||||
store: &mut CubeStore<B>,
|
||||
path: &str,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user