Repository navigation
Fix clippy collapsible_match errors on main - #3571
Merged
Merged
Conversation
Contributor
Author
Review (pragmatic-code-reviewer, medium depth, behaviour equivalence)Verdict: approve. No blockers, no
Clippy on the new shapes: guards are the form Nit: a comment that a duplicate target falls through to |
Contributor
Author
Address reviewNo blockers to address.
|
This was referenced Oct 5, 2026
Collapse nested ifs into match guards (structure.rs, plain_text.rs) and restructure the side-effecting remove in merge_schema_definition (crud.rs) with no behaviour change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The plain_text.rs lint fix needs the packages/agent owner's sign-off, so it moves to its own change. This PR keeps the two nodespace-core fixes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mstomar125
force-pushed
the
fix-clippy-collapsible-match
branch
from
October 5, 2026 06:31
975fc7e to
284fbcc
Compare
This was referenced Oct 5, 2026
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 the two
clippy::collapsible_matcherrors innodespace-coreonmain. They came from10eced28, andbun run rust:lintandquality:fixfail onmainbecause of them. The changes are behaviour-preserving, with no#[allow]:packages/core/src/db/sqlite_store/structure.rs(CHILDREN_EXCEPTarm): now a match guardif !except.contains(target). A duplicate target falls through to_ => {}, a no-op as before.children_exceptandparent_ofare distinct consts, so no other arm can match.packages/core/src/services/node_service/crud.rs(merge_schema_definition): no guard here, becausestored.remove(key)has a side effect, so a guard would change which arm runs. It is nowif let Some(value) = written.remove(key) { if value.is_null() { remove-if-stored, push to cleared } else { insert } }. A Null for an unstored key still does nothing.A third error, in
packages/agent/src/pty/plain_text.rs, surfaced once these compiled.packages/agentneeds its owner's sign-off, so that fix moved to #3574. After this PR,rust:lintis clean except for that one site.Checks:
cargo clippy -p nodespace-core --all-targets -D warningsis clean.nodespace-corepasses (structure, schema and merge_schema filters: 511 passed).bun run test:changedpasses.check-pro-boundaryis clean.Review: APPROVE, with behaviour equivalence proved for each site; see the PR comments.
The merge gate gap that let these land is #3563.
🤖 Generated with Claude Code