diff --git a/Cargo.lock b/Cargo.lock index 2295de2..5327016 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2965,7 +2965,7 @@ dependencies = [ [[package]] name = "rustyscript" -version = "0.8.2" +version = "0.8.3" dependencies = [ "criterion", "deno_ast", diff --git a/Cargo.toml b/Cargo.toml index 64682e6..88b5a23 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "rustyscript" description = "Effortless JS Integration for Rust" edition = "2021" license = "MIT OR Apache-2.0" -version = "0.8.2" +version = "0.8.3" repository = "https://github.com/rscarson/rustyscript" keywords = ["rust", "javascript", "deno", "runtime", "embedding"] diff --git a/src/runtime.rs b/src/runtime.rs index 9b619c4..34d60db 100644 --- a/src/runtime.rs +++ b/src/runtime.rs @@ -485,11 +485,9 @@ impl Runtime { T: deno_core::serde::de::DeserializeOwned, { let function = function.as_global(&mut self.deno_runtime().handle_scope()); - let result = self.run_async_task(|runtime| async move { - runtime - .inner - .call_function_by_ref(module_context, &function, args) - })?; + let result = self + .inner + .call_function_by_ref(module_context, &function, args)?; self.inner.decode_value(result) }