style: Simplify dependency visitor, avoid tracking dependencies of nested complex selectors separately.

This commit is contained in:
Emilio Cobos Álvarez 2017-04-12 14:34:43 +08:00
parent 568fa4cc0d
commit 9e33cd5643
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
4 changed files with 67 additions and 76 deletions

View file

@ -145,7 +145,7 @@ impl<Impl: SelectorImpl> SelectorMethods for Selector<Impl> {
}
}
impl<Impl: SelectorImpl> SelectorMethods for Arc<ComplexSelector<Impl>> {
impl<Impl: SelectorImpl> SelectorMethods for ComplexSelector<Impl> {
type Impl = Impl;
fn visit<V>(&self, visitor: &mut V) -> bool

View file

@ -34,7 +34,7 @@ pub trait SelectorVisitor {
/// Gets the combinator to the right of the selector, or `None` if the
/// selector is the leftmost one.
fn visit_complex_selector(&mut self,
_: &Arc<ComplexSelector<Self::Impl>>,
_: &ComplexSelector<Self::Impl>,
_combinator_to_right: Option<Combinator>)
-> bool {
true