Skip to content

Editor state change, break after match#166283

Merged
bpasero merged 1 commit intomicrosoft:mainfrom
ecstrema:statechange
Nov 15, 2022
Merged

Editor state change, break after match#166283
bpasero merged 1 commit intomicrosoft:mainfrom
ecstrema:statechange

Conversation

@ecstrema
Copy link
Contributor

In State.update, the update type was compared against all the possible types.

The solution is to use a switch case instead, or to use else-if instead.

In State.update, the update type was compared against all the possible types.

The solution is to use a switch case instead, or to use else-if instead.
@ecstrema
Copy link
Contributor Author

@microsoft-github-policy-service agree

@vscodenpa vscodenpa added the install-update VS Code installation and upgrade system issues label Nov 14, 2022
@bpasero
Copy link
Member

bpasero commented Nov 14, 2022

What issue does this fix?

@bpasero bpasero added info-needed Issue requires more information from poster and removed install-update VS Code installation and upgrade system issues labels Nov 14, 2022
@ecstrema
Copy link
Contributor Author

It does not fix any issues. It simply saves a few comparisons on every single selection change. Which might save a few microseconds.

@bpasero bpasero removed the info-needed Issue requires more information from poster label Nov 15, 2022
@bpasero bpasero added this to the November 2022 milestone Nov 15, 2022
@bpasero
Copy link
Member

bpasero commented Nov 15, 2022

Yeah thanks, your solution makes a lot more sense to me, weird that we did not use switch/case before.

@bpasero bpasero enabled auto-merge (squash) November 15, 2022 06:02
@bpasero bpasero merged commit a3c64da into microsoft:main Nov 15, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 30, 2022
@ecstrema ecstrema deleted the statechange branch February 21, 2024 15:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants