Introduced `consumeEach` for channels and reactive streams, deprecated iteration on reactive streams
diff --git a/reactive/kotlinx-coroutines-rx2/src/test/kotlin/guide/example-reactive-context-01.kt b/reactive/kotlinx-coroutines-rx2/src/test/kotlin/guide/example-reactive-context-01.kt
index 02c94c4..adaede0 100644
--- a/reactive/kotlinx-coroutines-rx2/src/test/kotlin/guide/example-reactive-context-01.kt
+++ b/reactive/kotlinx-coroutines-rx2/src/test/kotlin/guide/example-reactive-context-01.kt
@@ -17,7 +17,8 @@
// This file was automatically generated from coroutines-guide-reactive.md by Knit tool. Do not edit.
package guide.reactive.context.example01
-import io.reactivex.*
+import io.reactivex.Flowable
+import io.reactivex.Scheduler
import io.reactivex.functions.BiFunction
import io.reactivex.schedulers.Schedulers
import java.util.concurrent.TimeUnit
@@ -29,8 +30,7 @@
BiFunction { x, _ -> x })
fun main(args: Array<String>) {
- rangeWithIntervalRx(Schedulers.computation(), 100, 1, 3).subscribe { x ->
- println("$x on thread ${Thread.currentThread().name}")
- }
+ rangeWithIntervalRx(Schedulers.computation(), 100, 1, 3)
+ .subscribe { println("$it on thread ${Thread.currentThread().name}") }
Thread.sleep(1000)
}