diff --git a/benchmarks/src/jvmMain/kotlin/com/github/michaelbull/result/SuspendBindingBenchmark.kt b/benchmarks/src/jvmMain/kotlin/com/github/michaelbull/result/SuspendBindingBenchmark.kt index ea0f243..9a0d1b0 100644 --- a/benchmarks/src/jvmMain/kotlin/com/github/michaelbull/result/SuspendBindingBenchmark.kt +++ b/benchmarks/src/jvmMain/kotlin/com/github/michaelbull/result/SuspendBindingBenchmark.kt @@ -9,7 +9,6 @@ import kotlinx.benchmark.OutputTimeUnit import kotlinx.benchmark.Scope import kotlinx.benchmark.State import kotlinx.coroutines.async -import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking import com.github.michaelbull.result.coroutines.binding.binding as coroutineBinding @@ -54,12 +53,10 @@ class SuspendBindingBenchmark { x + y } - private suspend fun withAsyncSuspend(): Result = coroutineScope { - coroutineBinding { - val x = async { provideX().bind() } - val y = async { provideY().bind() } - x.await() + y.await() - } + private suspend fun withAsyncSuspend(): Result = coroutineBinding { + val x = async { provideX().bind() } + val y = async { provideY().bind() } + x.await() + y.await() } private fun provideXBlocking(): Result {