Skip to content

Commit 0bfbd6f

Browse files
committed
perf: Inline more
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
1 parent 3b48196 commit 0bfbd6f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

css-inline/src/html/element.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ impl<'a> Element<'a> {
9393
}
9494
}
9595
}
96+
// NOTE: For large documents, it is called in a hot loop.
97+
#[allow(clippy::inline_always)]
98+
#[inline(always)]
9699
pub(crate) fn matches(&self, selector: &Selector, cache: &mut SelectorCaches) -> bool {
97100
let mut context = matching::MatchingContext::new(
98101
matching::MatchingMode::Normal,

0 commit comments

Comments
 (0)