Replace Nothing with Unit in processor state
Coroutines 1.6 changed internal implementation of StateFlow
and now it's impossible to implement StateFlow
with Nothing
type. Workaround is to use Unit
type instead of Nothing
to represent no meaningful state in processor.
Migration
Replace Nothing with Unit
val processor: Processor<MyEvent, Nothing, MyEffect> = processor(
prepare = { ... },
onEvent = { ... }
)
val processor: Processor<MyEvent, Unit, MyEffect> = processor(
prepare = { ... },
onEvent = { ... }
)