commit a3aa8952875aa5f04ea77cd0f2365af8488171ad
parent 566f24cc32c3e0d85ed2a377dab182857b8db2d5
Author: noriaki watanabe <nabeyang@gmail.com>
Date: Mon, 15 Dec 2025 12:58:58 +0000
Bug 2006047 - Remove redundant specificity_and_flags wrapper and inline implementation r=emilio,firefox-style-system-reviewers
The `specificity_and_flags` function was a simple wrapper around
`complex_selector_specificity_and_flags`, forwarding its arguments and
calling `.into()` on the result despite both functions returning
the same `SpecificityAndFlags` type.
Since the wrapper did not provide any additional behavior or abstraction,
and is only called from one location, this change consolidates the
implementation by renaming `complex_selector_specificity_and_flags` to
`specificity_and_flags` and removes the redundant wrapper and the
unnecessary `.into()` call.
No behavior changes are introduced by this cleanup, and all call sites
continue to function correctly with the consolidated definition.
Differential Revision: https://phabricator.services.mozilla.com/D276446
Diffstat:
1 file changed, 0 insertions(+), 10 deletions(-)
diff --git a/servo/components/selectors/builder.rs b/servo/components/selectors/builder.rs
@@ -289,16 +289,6 @@ fn specificity_and_flags<Impl>(
where
Impl: SelectorImpl,
{
- complex_selector_specificity_and_flags(iter, for_nesting_parent).into()
-}
-
-fn complex_selector_specificity_and_flags<Impl>(
- iter: slice::Iter<Component<Impl>>,
- for_nesting_parent: bool,
-) -> SpecificityAndFlags
-where
- Impl: SelectorImpl,
-{
fn component_specificity<Impl>(
simple_selector: &Component<Impl>,
specificity: &mut Specificity,