Revert "fix of build"

This reverts commit 90247667d1.
This commit is contained in:
2024-06-19 19:50:19 +06:00
parent 90247667d1
commit ab58478686
3 changed files with 7 additions and 9 deletions

View File

@@ -5,9 +5,7 @@ import dev.inmo.micro_utils.coroutines.runCatchingSafely
interface SafeWrapper<T> {
fun <R> safe(block: T.() -> R): Result<R> = unsafeTarget().runCatching(block)
fun <R> unsafe(block: T.() -> R): R = unsafeTarget().block()
suspend fun <R> safeS(block: suspend T.() -> R): Result<R> = unsafeTarget().run {
runCatchingSafely(block = { block() })
}
suspend fun <R> safeS(block: suspend T.() -> R): Result<R> = unsafeTarget().runCatchingSafely(block = block)
suspend fun <R> unsafeS(block: suspend T.() -> R): R = unsafeTarget().block()
fun unsafeTarget(): T