mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-21 15:05:19 +00:00
Update libsession/src/main/java/org/session/libsession/snode/utilities/PromiseUtil.kt
Co-authored-by: Andrew <andrewgallasch@gmail.com>
This commit is contained in:
parent
7a8e1309fb
commit
a594952832
@ -7,7 +7,7 @@ import kotlin.coroutines.suspendCoroutine
|
||||
|
||||
suspend fun <T, E: Throwable> Promise<T, E>.await(): T {
|
||||
return suspendCoroutine { cont ->
|
||||
success { cont.resume(it) }
|
||||
fail { cont.resumeWithException(it) }
|
||||
success(cont::resume)
|
||||
fail(cont::resumeWithException)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user