UPSTREAM PR #16708: Fix confusing double negation with empty else if#119
UPSTREAM PR #16708: Fix confusing double negation with empty else if#119loci-dev wants to merge 3 commits into
else if#119Conversation
This `else if` branch being empty makes no sense if there is no comment. Can be collapsed by removing the negation on the `matches!` Stumbled over this while reading nushell/nushell#16688 (comment)
OverviewAnalysis of 29,125 functions shows negligible performance impact with 0.006% power consumption reduction. The 3 commits refactor conditional expressions to eliminate confusing double negations—a code quality improvement with no performance regressions. Function counts: 97 modified, 129 new, 129 removed, 28,770 unchanged Binary:
Function Analysis
SQLite functions ( No changes to performance-critical areas (IR execution, pipeline data flow, parser, REPL loop). 🔎 Full breakdown: Loci Inspector |
d6c3b3e to
aa2e4e6
Compare
Note
Source pull request: nushell/nushell#16708
This
else ifbranch being empty makes no sense if there is no comment.Can be collapsed by removing the negation on the
matches!Stumbled over this while reading nushell/nushell#16688 (comment)
Release notes summary - What our users need to know
N/A
Tasks after submitting
ast-greprule for that, sadlyclippy::needless_elsedoesn't seem to catch it.