Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(oxc): apply clippy::needless_pass_by_ref_mut #9253

Merged

Conversation

Boshen
Copy link
Member

@Boshen Boshen commented Feb 20, 2025

No description provided.

@github-actions github-actions bot added A-parser Area - Parser A-minifier Area - Minifier A-transformer Area - Transformer / Transpiler A-prettier Area - Prettier A-isolated-declarations Isolated Declarations A-ast-tools Area - AST tools C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Feb 20, 2025
Copy link
Member Author

Boshen commented Feb 20, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

graphite-app bot commented Feb 20, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 02-20-refactor_oxc_apply_clippy_needless_pass_by_ref_mut_ branch from afb2c7c to ef856f5 Compare February 20, 2025 02:13
@graphite-app graphite-app bot merged commit ef856f5 into main Feb 20, 2025
26 checks passed
@graphite-app graphite-app bot deleted the 02-20-refactor_oxc_apply_clippy_needless_pass_by_ref_mut_ branch February 20, 2025 02:17
Copy link

codspeed-hq bot commented Feb 20, 2025

CodSpeed Performance Report

Merging #9253 will not alter performance

Comparing 02-20-refactor_oxc_apply_clippy_needless_pass_by_ref_mut_ (ef856f5) with main (9f36181)

Summary

✅ 33 untouched benchmarks

graphite-app bot pushed a commit that referenced this pull request Feb 21, 2025
#9253 enabled clippy's `needless_pass_by_ref_mut` rule, but kept it disabled for the `oxc_transformer` crate.

This rule is really good as using `&` instead of `&mut` may allow the compiler to make more optimizations in some cases, as `&` guarantees that value is not changed during the function call which takes `&`.

Enable this lint and fix all the warnings it highlights.

The diff is large, but it's purely replacing `&mut` with `&` in lots of places.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ast-tools Area - AST tools A-isolated-declarations Isolated Declarations A-minifier Area - Minifier A-parser Area - Parser A-prettier Area - Prettier A-transformer Area - Transformer / Transpiler C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant