@@ -5,9 +5,6 @@ import com.adamratzman.spotify.models.AbstractPagingObject
5
5
import com.adamratzman.spotify.utils.TimeUnit
6
6
import com.adamratzman.spotify.utils.getCurrentTimeMs
7
7
import com.adamratzman.spotify.utils.schedule
8
- import kotlin.coroutines.resume
9
- import kotlin.coroutines.resumeWithException
10
- import kotlin.coroutines.suspendCoroutine
11
8
import kotlinx.coroutines.CoroutineDispatcher
12
9
import kotlinx.coroutines.Dispatchers
13
10
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -21,6 +18,9 @@ import kotlinx.coroutines.flow.flow
21
18
import kotlinx.coroutines.flow.flowOn
22
19
import kotlinx.coroutines.launch
23
20
import kotlinx.coroutines.withContext
21
+ import kotlin.coroutines.resume
22
+ import kotlin.coroutines.resumeWithException
23
+ import kotlin.coroutines.suspendCoroutine
24
24
25
25
/* *
26
26
* Provides a uniform interface to retrieve, whether synchronously or asynchronously, [T] from Spotify
@@ -46,11 +46,7 @@ open class SpotifyRestAction<T> internal constructor(protected val api: SpotifyA
46
46
*/
47
47
fun complete (): T {
48
48
hasRunBacking = true
49
- return try {
50
- supplier().also { hasCompletedBacking = true }
51
- } catch (e: Throwable ) {
52
- throw e
53
- }
49
+ return supplier().also { hasCompletedBacking = true }
54
50
}
55
51
56
52
/* *
0 commit comments