style: Assert earlier to try to get a more helpful stack.

This commit is contained in:
Emilio Cobos Álvarez 2018-10-27 13:16:48 +02:00
parent e7261d51e9
commit 67fae7a2ce
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -72,7 +72,7 @@ impl<Impl: SelectorImpl> SelectorBuilder<Impl> {
/// Pushes a simple selector onto the current compound selector.
#[inline(always)]
pub fn push_simple_selector(&mut self, ss: Component<Impl>) {
debug_assert!(!ss.is_combinator());
assert!(!ss.is_combinator());
self.simple_selectors.push(ss);
self.current_len += 1;
}