From 94d369ebc65a55bd9fbf378a765c8ed88a4efe2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20D=C3=BCrr?= <102963075+cd-work@users.noreply.github.com> Date: Mon, 20 Jun 2022 12:40:57 +0000 Subject: docs: Improve `mod_evaluate` documentation (#14827) --- core/examples/ts_module_loader.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/examples/ts_module_loader.rs') diff --git a/core/examples/ts_module_loader.rs b/core/examples/ts_module_loader.rs index 7771812d3..50d101b87 100644 --- a/core/examples/ts_module_loader.rs +++ b/core/examples/ts_module_loader.rs @@ -109,9 +109,9 @@ fn main() -> Result<(), Error> { let future = async move { let mod_id = js_runtime.load_main_module(&main_module, None).await?; - let _ = js_runtime.mod_evaluate(mod_id); + let result = js_runtime.mod_evaluate(mod_id); js_runtime.run_event_loop(false).await?; - Ok(()) + result.await? }; tokio::runtime::Builder::new_current_thread() -- cgit v1.2.3