Skip to content

Fix clippy result_large_err in embeddings_service's search_semantic - #2464

Merged
mstomar125 merged 1 commit into
mainfrom
hotfix-embeddings-result-large-err
Sep 8, 2026
Merged

mstomar125 merged 1 commit into
mainfrom
hotfix-embeddings-result-large-err

Conversation

@mstomar125

Copy link
Copy Markdown
Contributor

Fixes a real, currently-broken `cargo clippy --all-targets -D warnings` failure on `main` (from PR #2452), blocking the `quality:fix`/`quality:check` step for anyone touching Rust — 3 independent parallel agents hit this today.

`collect::<Result<Vec<_>, Status>>()` embeds a full `tonic::Status` (176+ bytes) as the `Err` variant per collected item, tripping clippy's `result_large_err` lint. Rewritten as a plain for-loop with an early return; behavior unchanged (a result missing its node still returns `Status::internal` immediately).

Verified: `cargo clippy -p nodespace-daemon --all-targets -D warnings` clean, `cargo test -p nodespace-daemon --lib` 183/183 passing, full pre-push gate (test:all + cargo build --bin nodespaced + e2e) passed clean.

Merging directly given the urgency (actively blocking multiple in-flight agents).

The map+collect::<Result<Vec<_>, Status>>() pattern trips clippy's
result_large_err lint (tonic::Status is ~176 bytes) once -D warnings is
applied -- this landed clean in isolation before a later merge to main
turned on the strict lint set, the same "two independently-green PRs
combine into a red main" pattern as the collection-field rename break.
Rewritten as a plain for-loop with an early return, same behavior
(a result missing its node still returns Status::internal immediately).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant