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(js_formatter): remove NeedsParentheses::needs_parentheses_aith_parent #3528

Merged
merged 1 commit into from
Jul 27, 2024

Conversation

Conaclos
Copy link
Member

@Conaclos Conaclos commented Jul 26, 2024

Summary

This PR removes NeedsParentheses::needs_parentheses_aith_parent.
This function creates an indirection and creates as much code as it avoids.

It was sometimes confusing to understand which function between NeedsParentheses::needs_parentheses and NeedsParentheses::needs_parentheses_aith_parent was called because some code call one, and other call the other.

Also, this leads to code duplication in Any* impl.

Test Plan

CI must pass.

@github-actions github-actions bot added A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages labels Jul 26, 2024
@Conaclos Conaclos force-pushed the conaclos/remove-need-parens-with-parent branch from f5b2e58 to 9c20286 Compare July 26, 2024 16:23
Copy link

codspeed-hq bot commented Jul 26, 2024

CodSpeed Performance Report

Merging #3528 will not alter performance

Comparing conaclos/remove-need-parens-with-parent (9c20286) with main (b468cd5)

Summary

✅ 104 untouched benchmarks

@Conaclos Conaclos merged commit 5ff6e11 into main Jul 27, 2024
16 checks passed
@Conaclos Conaclos deleted the conaclos/remove-need-parens-with-parent branch July 27, 2024 08:29
@Conaclos Conaclos added the A-Changelog Area: changelog label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant