arekolek
03/04/2021, 1:57 PMlistOf(1, 2, 3).map { Unit }
IDE marks Unit
as redundant and proposes to replace it with:
listOf(1, 2, 3).map { }
How do you handle this? Proposed fix looks weird to me. This issue occurs quite often in RxJava streamsCyril Find
03/04/2021, 2:00 PMList(3) { Unit }
arekolek
03/04/2021, 2:01 PMThis issue occurs quite often in RxJava streams
Observable<Unit>
after some transformations to the inputmkrussel
03/04/2021, 2:31 PMmapToUnit
. Then the odd code is only in one place.Cyril Find
03/04/2021, 2:33 PMgildor
05/25/2021, 10:06 AMProposed fix looks weird to me.I add comment in the body of map, though, I would prefer if it would be fixed and { Unit } wouldn’t be marked as warning