Merge code

This commit is contained in:
2022-03-13 00:23:09 +08:00
parent d11dfe5167
commit fa3cddd75f

View File

@@ -67,6 +67,6 @@ inline fun safeOfNan(result: () -> Int) = safeOf(default = 0, result)
*/
inline fun <T> safeOf(default: T, result: () -> T) = try {
result()
} catch (t: Throwable) {
} catch (_: Throwable) {
default
}