Repository navigation
Fix clippy result_large_err in embeddings_service's search_semantic - #2464
Merged
Merged
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).