[fenix] For https://github.com/mozilla-mobile/fenix/issues/21294: change `when (condition) {` `when {` in Fact.toEvent.

This will not compile. However, it enables the subsequent PR to remove
allocations from Fact.toEvent.
pull/600/head
Michael Comella 3 years ago committed by mergify[bot]
parent 32c8709148
commit 08a11127aa

@ -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