Skip to content

code_style: use switch expressions for simple value mapping#1579

Open
NathanBaulch wants to merge 1 commit intosourcegit-scm:developfrom
NathanBaulch:switch
Open

code_style: use switch expressions for simple value mapping#1579
NathanBaulch wants to merge 1 commit intosourcegit-scm:developfrom
NathanBaulch:switch

Conversation

@NathanBaulch
Copy link
Contributor

Switch expressions provide a nice compact way to convert values, especially to/from enums.
This PR introduces switch expressions where they make sense, in particular a new Models.Change.ChangeStateFromCode function (feel free to rename) that dramatically simplifies the QueryLocalChanges command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant