diff --git a/core/engine/src/builtins/builder.rs b/core/engine/src/builtins/builder.rs index c586ed94a10..4533190da65 100644 --- a/core/engine/src/builtins/builder.rs +++ b/core/engine/src/builtins/builder.rs @@ -1,4 +1,3 @@ - use crate::{ js_string, native_function::{NativeFunctionObject, NativeFunctionPointer}, diff --git a/core/engine/src/builtins/iterable/mod.rs b/core/engine/src/builtins/iterable/mod.rs index 10319b98d7c..b2de198516f 100644 --- a/core/engine/src/builtins/iterable/mod.rs +++ b/core/engine/src/builtins/iterable/mod.rs @@ -1,7 +1,14 @@ //! Boa's implementation of ECMAScript's `IteratorRecord` and iterator prototype objects. use crate::{ - builtins::{BuiltInBuilder, IntrinsicObject}, context::intrinsics::Intrinsics, error::JsNativeError, js_string, object::JsObject, realm::Realm, symbol::JsSymbol, Context, JsResult, JsValue + builtins::{BuiltInBuilder, IntrinsicObject}, + context::intrinsics::Intrinsics, + error::JsNativeError, + js_string, + object::JsObject, + realm::Realm, + symbol::JsSymbol, + Context, JsResult, JsValue, }; use boa_gc::{Finalize, Trace}; use boa_profiler::Profiler; diff --git a/core/engine/src/builtins/regexp/mod.rs b/core/engine/src/builtins/regexp/mod.rs index fc3e1bada60..9fb6a1f7c29 100644 --- a/core/engine/src/builtins/regexp/mod.rs +++ b/core/engine/src/builtins/regexp/mod.rs @@ -1262,7 +1262,9 @@ impl RegExp { // 3. If matchStr is the empty String, then if match_str.is_empty() { // a. Let thisIndex be ℝ(? ToLength(? Get(rx, "lastIndex"))). - let this_index = rx.get(js_string!("lastIndex"), context)?.to_length(context)?; + let this_index = rx + .get(js_string!("lastIndex"), context)? + .to_length(context)?; // b. Let nextIndex be AdvanceStringIndex(S, thisIndex, fullUnicode). let next_index = advance_string_index(&arg_str, this_index, full_unicode); @@ -1313,10 +1315,14 @@ impl RegExp { })?; // 3. Let pattern be ? ToString(? Get(R, "source")). - let pattern = regexp.get(js_string!("source"), context)?.to_string(context)?; + let pattern = regexp + .get(js_string!("source"), context)? + .to_string(context)?; // 4. Let flags be ? ToString(? Get(R, "flags")). - let flags = regexp.get(js_string!("flags"), context)?.to_string(context)?; + let flags = regexp + .get(js_string!("flags"), context)? + .to_string(context)?; // 5. Let result be the string-concatenation of "/", pattern, "/", and flags. // 6. Return result. @@ -1352,7 +1358,9 @@ impl RegExp { let c = regexp.species_constructor(StandardConstructors::regexp, context)?; // 5. Let flags be ? ToString(? Get(R, "flags")). - let flags = regexp.get(js_string!("flags"), context)?.to_string(context)?; + let flags = regexp + .get(js_string!("flags"), context)? + .to_string(context)?; // 6. Let matcher be ? Construct(C, « R, flags »). let matcher = c.construct(&[this.clone(), flags.clone().into()], Some(&c), context)?; @@ -1487,7 +1495,9 @@ impl RegExp { // 2. If matchStr is the empty String, then if match_str.is_empty() { // a. Let thisIndex be ℝ(? ToLength(? Get(rx, "lastIndex"))). - let this_index = rx.get(js_string!("lastIndex"), context)?.to_length(context)?; + let this_index = rx + .get(js_string!("lastIndex"), context)? + .to_length(context)?; // b. Let nextIndex be AdvanceStringIndex(S, thisIndex, fullUnicode). let next_index = advance_string_index(&s, this_index, full_unicode); diff --git a/core/engine/src/object/builtins/jsmap.rs b/core/engine/src/object/builtins/jsmap.rs index 6a4e286b3ca..fa27c52dd8d 100644 --- a/core/engine/src/object/builtins/jsmap.rs +++ b/core/engine/src/object/builtins/jsmap.rs @@ -314,7 +314,7 @@ impl JsMap { /// ``` /// # use boa_engine::{ /// # object::builtins::JsMap, - /// # Context, JsValue, JsResult, js_str + /// # Context, JsValue, JsResult, js_string /// # }; /// # fn main() -> JsResult<()> { /// # let context = &mut Context::default(); diff --git a/core/engine/src/object/builtins/jsproxy.rs b/core/engine/src/object/builtins/jsproxy.rs index 00432a40555..125723f71cb 100644 --- a/core/engine/src/object/builtins/jsproxy.rs +++ b/core/engine/src/object/builtins/jsproxy.rs @@ -1,7 +1,12 @@ //! A Rust API wrapper for the `Proxy` Builtin ECMAScript Object use super::JsFunction; use crate::{ - builtins::Proxy, js_string, native_function::{NativeFunction, NativeFunctionPointer}, object::{FunctionObjectBuilder, JsObject}, value::TryFromJs, Context, JsNativeError, JsResult, JsValue + builtins::Proxy, + js_string, + native_function::{NativeFunction, NativeFunctionPointer}, + object::{FunctionObjectBuilder, JsObject}, + value::TryFromJs, + Context, JsNativeError, JsResult, JsValue, }; use boa_gc::{Finalize, Trace}; diff --git a/core/engine/src/value/display.rs b/core/engine/src/value/display.rs index 9c02b59502a..9320bb5dd67 100644 --- a/core/engine/src/value/display.rs +++ b/core/engine/src/value/display.rs @@ -3,7 +3,10 @@ use crate::{ builtins::{ error::ErrorObject, map::ordered_map::OrderedMap, promise::PromiseState, set::ordered_set::OrderedSet, Array, Promise, - }, js_string, property::PropertyDescriptor, JsError, JsString + }, + js_string, + property::PropertyDescriptor, + JsError, JsString, }; use std::borrow::Cow;