This is really only used once, so if you switch to a `case` statement you can just inline it and remove the temporary variable.