diff --git a/core/engine/src/lib.rs b/core/engine/src/lib.rs index f993c28719d..c017bfb4c60 100644 --- a/core/engine/src/lib.rs +++ b/core/engine/src/lib.rs @@ -79,10 +79,10 @@ compile_error!("Boa requires a lock free `AtomicUsize` in order to work properly extern crate self as boa_engine; extern crate static_assertions as sa; -pub use boa_parser as parser; pub use boa_ast as ast; pub use boa_gc as gc; pub use boa_interner as interner; +pub use boa_parser as parser; pub mod bigint; pub mod builtins; diff --git a/core/engine/src/module/loader.rs b/core/engine/src/module/loader.rs index a27f1b1ec2b..c7d8855df5d 100644 --- a/core/engine/src/module/loader.rs +++ b/core/engine/src/module/loader.rs @@ -312,7 +312,7 @@ impl ModuleLoader for SimpleModuleLoader { fn register_module(&self, specifier: JsString, module: Module) { let path = PathBuf::from(specifier.to_std_string_escaped()); - self.insert(path, module) + self.insert(path, module); } fn get_module(&self, specifier: JsString) -> Option { diff --git a/tests/tester/src/exec/js262.rs b/tests/tester/src/exec/js262.rs index 7bdc58b1010..62cedb9be52 100644 --- a/tests/tester/src/exec/js262.rs +++ b/tests/tester/src/exec/js262.rs @@ -189,7 +189,9 @@ fn sleep(_: &JsValue, args: &[JsValue], context: &mut Context) -> JsResult JsResult { - let clock = START.get().ok_or_else(|| JsNativeError::typ().with_message("could not get the monotonic clock"))?; + let clock = START + .get() + .ok_or_else(|| JsNativeError::typ().with_message("could not get the monotonic clock"))?; Ok(JsValue::from(clock.elapsed().as_millis() as f64)) } diff --git a/tests/tester/src/exec/mod.rs b/tests/tester/src/exec/mod.rs index 9a40f8688b4..a8c7f177e35 100644 --- a/tests/tester/src/exec/mod.rs +++ b/tests/tester/src/exec/mod.rs @@ -228,12 +228,10 @@ impl Test { if verbosity > 2 { println!( - "`{}`{}: result text", + "`{}`{}: result text\n{result_text}\n", self.path.display(), if strict { " (strict)" } else { "" }, ); - println!("{}", result_text); - println!(); } TestResult { @@ -377,12 +375,11 @@ impl Test { phase: Phase::Resolution, error_type, } => { - let ref mut context = - match self.create_context(harness, optimizer_options, console) { - Ok(r) => r, - Err(e) => return (false, e), - } - .0; + let context = &mut match self.create_context(harness, optimizer_options, console) { + Ok(r) => r, + Err(e) => return (false, e), + } + .0; let module = match parse_module_and_register(source, &self.path, context) { Ok(module) => module,