selectors: Remove useless assertion.

The code below asserts the same in a more fine-grained way.
This commit is contained in:
Emilio Cobos Álvarez 2017-10-14 11:56:03 +02:00
parent bcfe523c99
commit 48c85151dc
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -470,15 +470,6 @@ where
E: Element,
F: FnMut(&E, ElementSelectorFlags),
{
if cfg!(debug_assertions) {
if context.nesting_level == 0 &&
context.shared.matching_mode == MatchingMode::ForStatelessPseudoElement {
assert!(iter.clone().any(|c| {
matches!(*c, Component::PseudoElement(..))
}));
}
}
// If this is the special pseudo-element mode, consume the ::pseudo-element
// before proceeding, since the caller has already handled that part.
if context.nesting_level == 0 &&