sourcegit
sourcegit copied to clipboard
code_style: use switch expressions for simple value mapping
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.