Skip to content

Commit

Permalink
selectors: Remove useless assertion.
Browse files Browse the repository at this point in the history
The code below asserts the same in a more fine-grained way.
  • Loading branch information
emilio committed Oct 14, 2017
1 parent bcfe523 commit 48c8515
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions components/selectors/matching.rs
Expand Up @@ -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 &&
Expand Down

0 comments on commit 48c8515

Please sign in to comment.