mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2026-11-01 17:43:03 +00:00
update dependencies
This commit is contained in:
1 parent
cb56bf9793
commit
078aedfb68
8 files changed
+82
-19
No files matched your search
@@ -0,0 +1,12 @@
|
||||
package dev.inmo.micro_ksp.generator
|
||||
|
||||
inline fun <T> withNoSuchElementWorkaround(
|
||||
default: T,
|
||||
block: () -> T
|
||||
): T = runCatching(block).getOrElse {
|
||||
if (it is NoSuchElementException) {
|
||||
default
|
||||
} else {
|
||||
throw it
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user