Address some build warnings

This commit is contained in:
arkon
2023-07-14 23:08:45 -04:00
parent cbcec8c4d9
commit a629db2884
5 changed files with 15 additions and 27 deletions

View File

@ -7,6 +7,7 @@ import tachiyomi.core.util.lang.withIOContext
/**
* Util for evaluating JavaScript in sources.
*/
@Suppress("UNUSED", "UNCHECKED_CAST")
class JavaScriptEngine(context: Context) {
/**
@ -17,7 +18,6 @@ class JavaScriptEngine(context: Context) {
* @param script JavaScript to execute.
* @return Result of JavaScript code as a primitive type.
*/
@Suppress("UNUSED", "UNCHECKED_CAST")
suspend fun <T> evaluate(script: String): T = withIOContext {
QuickJs.create().use {
it.evaluate(script) as T