[stdlib] Replace usage of Enum.values with Enum.entries

This commit is contained in:
Igor Yakovlev
2024-01-10 19:35:02 +01:00
committed by Space Team
parent 2d08953c91
commit 99d5ee4db8
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ internal fun wasiPrintImpl(
)
if (ret != 0) {
throw WasiError(WasiErrorCode.values()[ret])
throw WasiError(WasiErrorCode.entries[ret])
}
}
@@ -26,7 +26,7 @@ private fun wasiRandomGet(): Long {
return if (ret == 0) {
memory.loadLong()
} else {
throw WasiError(WasiErrorCode.values()[ret])
throw WasiError(WasiErrorCode.entries[ret])
}
}
}
@@ -29,7 +29,7 @@ private fun clockTimeGet(): Long = withScopedMemoryAllocator { allocator ->
if (ret == 0) {
rp0.loadLong()
} else {
throw WasiError(WasiErrorCode.values()[ret])
throw WasiError(WasiErrorCode.entries[ret])
}
}