Skip to content

Commit 64bc8d7

Browse files
hanggatheangrydev
andauthored
Update core-kotlin-modules/core-kotlin-concurrency-3/src/test/java/com/baeldung/singlerxjavatocoroutinedeferred/SingleRxJavaToCoroutineDeferredUnitTest.kt
Co-authored-by: Liam Williams <[email protected]>
1 parent 299c8c2 commit 64bc8d7

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

core-kotlin-modules/core-kotlin-concurrency-3/src/test/java/com/baeldung/singlerxjavatocoroutinedeferred/SingleRxJavaToCoroutineDeferredUnitTest.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,7 @@ class SingleRxJavaToCoroutineDeferredUnitTest {
6565
fun `using suspendCancellableCoroutine`(): Unit = runBlocking {
6666
val deferred = async {
6767
suspendCancellableCoroutine { continuation ->
68-
getFilteredProducts().subscribe({ result ->
69-
continuation.resume(result)
70-
}, { error ->
71-
continuation.resumeWithException(error)
72-
})
68+
getFilteredProducts().subscribe(continuation::resume, continuation::resumeWithException)
7369
}
7470
}
7571
deferred.assertOver500AndSorted()

0 commit comments

Comments
 (0)