diff --git a/boa_engine/src/lib.rs b/boa_engine/src/lib.rs index 9e6e3ea26ce..65cd6ff6c19 100644 --- a/boa_engine/src/lib.rs +++ b/boa_engine/src/lib.rs @@ -35,6 +35,7 @@ clippy::needless_pass_by_value, clippy::match_wildcard_for_single_variants, clippy::map_unwrap_or, + clippy::missing_inline_in_public_items, unused_qualifications, unused_import_braces, unused_lifetimes, @@ -61,7 +62,6 @@ clippy::missing_panics_doc, clippy::too_many_lines, clippy::unreadable_literal, - clippy::missing_inline_in_public_items, clippy::cognitive_complexity, clippy::must_use_candidate, clippy::missing_errors_doc, diff --git a/boa_engine/src/syntax/ast/expression/access.rs b/boa_engine/src/syntax/ast/expression/access.rs index 4fa8aea6d80..ce6fdec6e43 100644 --- a/boa_engine/src/syntax/ast/expression/access.rs +++ b/boa_engine/src/syntax/ast/expression/access.rs @@ -134,6 +134,7 @@ pub struct PrivatePropertyAccess { impl PrivatePropertyAccess { /// Creates a `GetPrivateField` AST Expression. + #[inline] pub fn new(value: Expression, field: Sym) -> Self { Self { target: value.into(), @@ -142,14 +143,17 @@ impl PrivatePropertyAccess { } /// Gets the original object from where to get the field from. + #[inline] pub fn target(&self) -> &Expression { &self.target } /// Gets the name of the field to retrieve. + #[inline] pub fn field(&self) -> Sym { self.field } + #[inline] pub(crate) fn contains_arguments(&self) -> bool { self.target.contains_arguments() diff --git a/boa_engine/src/syntax/ast/expression/await.rs b/boa_engine/src/syntax/ast/expression/await.rs index 0e49c4c6a32..d49132c948a 100644 --- a/boa_engine/src/syntax/ast/expression/await.rs +++ b/boa_engine/src/syntax/ast/expression/await.rs @@ -22,6 +22,7 @@ pub struct Await { impl Await { /// Return the expression that should be awaited. + #[inline] pub(crate) fn expr(&self) -> &Expression { &self.expr } diff --git a/boa_engine/src/syntax/ast/expression/call.rs b/boa_engine/src/syntax/ast/expression/call.rs index eac8c0245dd..77d6efee35e 100644 --- a/boa_engine/src/syntax/ast/expression/call.rs +++ b/boa_engine/src/syntax/ast/expression/call.rs @@ -26,6 +26,7 @@ pub struct Call { impl Call { /// Creates a new `Call` AST Expression. + #[inline] pub fn new(target: Expression, args: Box<[Expression]>) -> Self { Self { target: target.into(), @@ -34,11 +35,13 @@ impl Call { } /// Gets the name of the function call. + #[inline] pub fn expr(&self) -> &Expression { &self.target } /// Retrieves the arguments passed to the function. + #[inline] pub fn args(&self) -> &[Expression] { &self.args } diff --git a/boa_engine/src/syntax/ast/expression/literal/object/mod.rs b/boa_engine/src/syntax/ast/expression/literal/object/mod.rs index 82dfe4289e4..da9690c9f18 100644 --- a/boa_engine/src/syntax/ast/expression/literal/object/mod.rs +++ b/boa_engine/src/syntax/ast/expression/literal/object/mod.rs @@ -3,12 +3,13 @@ #[cfg(test)] mod tests; -use crate::syntax::ast::expression::Expression; -use crate::syntax::ast::ContainsSymbol; - -use crate::syntax::ast::property::MethodDefinition; -use crate::syntax::ast::property::PropertyDefinition; -use crate::syntax::ast::{block_to_string, join_nodes}; +use crate::syntax::ast::{ + block_to_string, + expression::Expression, + join_nodes, + property::{MethodDefinition, PropertyDefinition}, + ContainsSymbol, +}; use boa_interner::{Interner, ToInternedString}; /// Objects in JavaScript may be defined as an unordered collection of related data, of