From 4bf201e318c646faf050b3fb6c65ddc5eca4d60b Mon Sep 17 00:00:00 2001 From: Youssef Shoaib Date: Sat, 18 May 2024 05:39:46 +0100 Subject: [PATCH] Remove debugging println --- .../src/commonMain/kotlin/arrow/fx/coroutines/Resource.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arrow-libs/fx/arrow-fx-coroutines/src/commonMain/kotlin/arrow/fx/coroutines/Resource.kt b/arrow-libs/fx/arrow-fx-coroutines/src/commonMain/kotlin/arrow/fx/coroutines/Resource.kt index 24205f240c..0da4428825 100644 --- a/arrow-libs/fx/arrow-fx-coroutines/src/commonMain/kotlin/arrow/fx/coroutines/Resource.kt +++ b/arrow-libs/fx/arrow-fx-coroutines/src/commonMain/kotlin/arrow/fx/coroutines/Resource.kt @@ -477,9 +477,7 @@ internal value class ResourceScopeImpl( suspend fun cancelAll(exitCase: ExitCase): Unit = withContext(NonCancellable) { finalizers.value.fold(exitCase.throwableOrNull) { acc, finalizer -> - val e = runCatching { finalizer(exitCase) }.exceptionOrNull() - println("Adding $e with $acc") - acc.add(e) + acc.add(runCatching { finalizer(exitCase) }.exceptionOrNull()) }?.let { throw it } } }