For #21294: change `when (condition) {` `when {` in Fact.toEvent.

This will not compile. However, it enables the subsequent PR to remove
allocations from Fact.toEvent.
upstream-sync
Michael Comella 3 years ago committed by mergify[bot]
parent 4c33b1b75c
commit d33e38e020

@ -158,7 +158,7 @@ internal class ReleaseMetricController(
}
@Suppress("LongMethod")
private fun Fact.toEvent(): Event? = when (Pair(component, item)) {
private fun Fact.toEvent(): Event? = when {
Component.FEATURE_PROMPTS to LoginDialogFacts.Items.DISPLAY -> Event.LoginDialogPromptDisplayed
Component.FEATURE_PROMPTS to LoginDialogFacts.Items.CANCEL -> Event.LoginDialogPromptCancelled
Component.FEATURE_PROMPTS to LoginDialogFacts.Items.NEVER_SAVE -> Event.LoginDialogPromptNeverSave

Loading…
Cancel
Save