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

perf: use logical assignments instead of if statements #6693

Merged
merged 1 commit into from Oct 3, 2021

Conversation

almeidx
Copy link
Member

@almeidx almeidx commented Sep 25, 2021

Please describe the changes this PR makes and why it should be merged:

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

@suneettipirneni
Copy link
Member

suneettipirneni commented Sep 25, 2021

I'm pretty sure some of these should be using ??= instead of &&=, no?

@suneettipirneni
Copy link
Member

Disregard that last comment

@ImRodry
Copy link
Contributor

ImRodry commented Sep 25, 2021

Are you sure you covered all instances where this can be applied? I thought there were many more

@almeidx
Copy link
Member Author

almeidx commented Sep 25, 2021

Are you sure you covered all instances where this can be applied? I thought there were many more

Most likely. I used this for a regex search: if\s*\(!?([\w.]+)\)\s*\{?\s*\1\s*=

@iCrawl iCrawl requested review from kyranet, SpaceEEC, novara754 and vladfrangu and removed request for novara754 September 26, 2021 19:35
@iCrawl iCrawl added this to the Version 13.2 milestone Sep 26, 2021
@iCrawl
Copy link
Member

iCrawl commented Oct 2, 2021

This needs a rebase.

@almeidx
Copy link
Member Author

almeidx commented Oct 2, 2021

Rebased

@iCrawl iCrawl merged commit e9daa31 into discordjs:main Oct 3, 2021
@almeidx almeidx deleted the logical-assignments branch October 3, 2021 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants