[auto-maintainer] refactor(facet): remove duplicate "gets" entries from SUBJECT_TERMINATORS - #702
Open
NickFlach wants to merge 1 commit into
Conversation
…MINATORS SUBJECT_TERMINATORS in src/facet.rs listed "gets" three times — once on the "became/made/gets/got" line and twice more on the "gives/takes/gets/gave/gone/gets" line. Vec/slice::contains short-circuits on the first match, so the two trailing copies were dead weight: they contributed nothing to the matching logic and created a subtle maintenance hazard (editing one copy might leave the others stale). Removed the two duplicate entries, leaving the single canonical "gets" on the "became/made" line intact. No behaviour change: the set of matched subject-terminator tokens is identical before and after. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ra7BE1aADqvr5H9r48EhmG
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.
What changed
Removed two duplicate
"gets"entries from theSUBJECT_TERMINATORSconstant insrc/facet.rs.Before:
After:
The entry
"gets"already appeared earlier on the same block's preceding line ("became", "made", "gets", ...). The two trailing copies on the"gives"/"takes"line were dead:slice::containsshort-circuits on the first match, so they contributed nothing to the matching logic.1 line changed, 1 file.
Why it's safe
SUBJECT_TERMINATORSis aconst &[&str]. The only use site is:Removing two entries that already match before they're reached produces identical runtime behaviour. The set of words that cause
leading_subjectto stop accumulating tokens is unchanged.Verification
Local
cargo check/cargo clippy --no-depscould not be run: this environment is missing the sibling path dependencyconsciousness-corerequired byCargo.toml. The change is restricted to removing two duplicate string literals from aconstslice — it cannot produce a compilation error and carries no semantic risk.Python sanity check (runs without Rust toolchain):
Runtime
~8 minutes wall-clock including startup jitter and repo selection.
Generated by Claude Code