Skip to content

refactor: avoid unnecessary assignment#13328

Merged
kgryte merged 1 commit into
developfrom
philipp/fix-propagation-2026-07-06
Jul 6, 2026
Merged

refactor: avoid unnecessary assignment#13328
kgryte merged 1 commit into
developfrom
philipp/fix-propagation-2026-07-06

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

This pull request:

  • Propagates the refactor from 3ceff10 (refactor: avoid unnecessary assignment) to sibling blas/ext/base/*last-index-of packages, collapsing the redundant idx = N - 1 - idx; return idx; sequence into a single return N - 1 - idx;. Target packages:
    • blas/ext/base/dlast-index-of
    • blas/ext/base/slast-index-of

Related Issues

None.

Questions

No.

Other

Validation: pattern search scoped to blas/ext/base/*/lib/ndarray.js, followed by two independent adversarial passes and a style-consistency check confirming each target is textually identical to the source's pre-refactor shape. Deliberately excluded: the equivalent src/main.c sequences in the same packages, since the source commit did not touch C.

Checklist

AI Assistance

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

This PR was authored by an automated Claude Code routine that propagates recent develop fixes to sibling packages with the same defect pattern. Pattern detection, candidate-site validation, and patch generation were AI-assisted; the resulting diff is the verbatim analog of 3ceff10.


@stdlib-js/reviewers


Generated by Claude Code

…dex-of`

Propagates refactor from 3ceff10 ("refactor: avoid unnecessary
assignment") to sibling last-index-of packages, collapsing the redundant
`idx = N - 1 - idx; return idx;` sequence into a single return.
@stdlib-bot stdlib-bot added the BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). label Jul 6, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/ext/base/dlast-index-of $\\color{green}363/363$
$\\color{green}+100.00\\%$
$\\color{green}17/17$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}363/363$
$\\color{green}+100.00\\%$
blas/ext/base/slast-index-of $\\color{green}363/363$
$\\color{green}+100.00\\%$
$\\color{green}17/17$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}363/363$
$\\color{green}+100.00\\%$

The above coverage report was generated for the changes in this PR.

@kgryte kgryte marked this pull request as ready for review July 6, 2026 23:00
@kgryte kgryte requested a review from a team July 6, 2026 23:00
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Jul 6, 2026
@kgryte kgryte changed the title refactor: avoid unnecessary assignment in blas/ext/base siblings refactor: avoid unnecessary assignment Jul 6, 2026
@kgryte kgryte merged commit ba80db9 into develop Jul 6, 2026
52 checks passed
@kgryte kgryte deleted the philipp/fix-propagation-2026-07-06 branch July 6, 2026 23:01
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants