Skip to content

Editor state change, break after match - #166283

Merged
Benjamin Pasero (bpasero) merged 1 commit into
microsoft:mainfrom
ecstrema:statechange
Nov 15, 2022
Merged

Benjamin Pasero (bpasero) merged 1 commit into
microsoft:mainfrom
ecstrema:statechange

Conversation

@ecstrema

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@vscodenpa VS Code Bot (vscodenpa) added the install-update VS Code installation and upgrade system issues label Nov 14, 2022
@bpasero

Copy link
Copy Markdown
Contributor

What issue does this fix?

@bpasero Benjamin Pasero (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
Copy Markdown
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 Benjamin Pasero (bpasero) removed the info-needed Issue requires more information from poster label Nov 15, 2022
@bpasero

Copy link
Copy Markdown
Contributor

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

@bpasero
Benjamin Pasero (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
Rémi Marche (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