summaryrefslogtreecommitdiff
path: root/core/examples
diff options
context:
space:
mode:
Diffstat (limited to 'core/examples')
-rw-r--r--core/examples/fs_module_loader.rs4
-rw-r--r--core/examples/ts_module_loader.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/core/examples/fs_module_loader.rs b/core/examples/fs_module_loader.rs
index 4b62b5687..cd22e022c 100644
--- a/core/examples/fs_module_loader.rs
+++ b/core/examples/fs_module_loader.rs
@@ -28,9 +28,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?
};
runtime.block_on(future)
}
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()