From 88874aee0c3362700871b650737904b99aa27417 Mon Sep 17 00:00:00 2001 From: jedel1043 Date: Mon, 2 Oct 2023 23:39:11 -0600 Subject: [PATCH] Fix example --- boa_engine/src/module/mod.rs | 2 +- boa_examples/src/bin/synthetic.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/boa_engine/src/module/mod.rs b/boa_engine/src/module/mod.rs index dc3d26d967e..a2941118e41 100644 --- a/boa_engine/src/module/mod.rs +++ b/boa_engine/src/module/mod.rs @@ -240,7 +240,7 @@ impl Module { // Concrete method [`LoadRequestedModules ( [ hostDefined ] )`][spec]. // // [spec]: https://tc39.es/ecma262/#sec-LoadRequestedModules - // TODO: 1. If hostDefined is not present, let hostDefined be empty. + // 1. If hostDefined is not present, let hostDefined be empty. // 2. Let pc be ! NewPromiseCapability(%Promise%). let pc = PromiseCapability::new( diff --git a/boa_examples/src/bin/synthetic.rs b/boa_examples/src/bin/synthetic.rs index 0702c568f80..54564cf340a 100644 --- a/boa_examples/src/bin/synthetic.rs +++ b/boa_examples/src/bin/synthetic.rs @@ -24,7 +24,7 @@ fn main() -> Result<(), Box> { "#; // This can be overriden with any custom implementation of `ModuleLoader`. - let loader = &SimpleModuleLoader::new("./boa_examples/scripts/modules")?; + let loader = &SimpleModuleLoader::new("./scripts/modules")?; let dyn_loader: &dyn ModuleLoader = loader; // Just need to cast to a `ModuleLoader` before passing it to the builder. @@ -33,7 +33,7 @@ fn main() -> Result<(), Box> { // Now, create the synthetic module and insert it into the loader. let operations = create_operations_module(context); loader.insert( - PathBuf::from("./boa_examples/scripts/modules") + PathBuf::from("./scripts/modules") .canonicalize()? .join("operations.mjs"), operations, @@ -50,7 +50,7 @@ fn main() -> Result<(), Box> { // Simulate as if the "fake" module is located in the modules root, just to ensure that // the loader won't double load in case someone tries to import "./main.mjs". loader.insert( - Path::new("./boa_examples/scripts/modules") + Path::new("./scripts/modules") .canonicalize()? .join("main.mjs"), module.clone(),