summaryrefslogtreecommitdiff
path: root/core/examples/ts_module_loader.rs
diff options
context:
space:
mode:
Diffstat (limited to 'core/examples/ts_module_loader.rs')
-rw-r--r--core/examples/ts_module_loader.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/examples/ts_module_loader.rs b/core/examples/ts_module_loader.rs
index 5493029a4..d9b32d5be 100644
--- a/core/examples/ts_module_loader.rs
+++ b/core/examples/ts_module_loader.rs
@@ -97,7 +97,7 @@ fn main() -> Result<(), Error> {
println!("Usage: target/examples/debug/ts_module_loader <path_to_module>");
std::process::exit(1);
}
- let main_url = args[1].clone();
+ let main_url = &args[1];
println!("Run {}", main_url);
let mut js_runtime = JsRuntime::new(RuntimeOptions {
@@ -105,7 +105,7 @@ fn main() -> Result<(), Error> {
..Default::default()
});
- let main_module = resolve_path(&main_url)?;
+ let main_module = resolve_path(main_url)?;
let future = async move {
let mod_id = js_runtime.load_main_module(&main_module, None).await?;