Auto merge of #18225 - jdm:unused-visitor-argument, r=emilio

Remove unused selector visitor argument.

The real win here is avoiding cloning the iterator when nobody actually uses it.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18225)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-08-25 01:10:03 -05:00 committed by GitHub
commit 69e28f0709
3 changed files with 1 additions and 3 deletions

View file

@ -272,7 +272,7 @@ impl<Impl: SelectorImpl> SelectorMethods for Selector<Impl> {
let mut current = self.iter();
let mut combinator = None;
loop {
if !visitor.visit_complex_selector(current.clone(), combinator) {
if !visitor.visit_complex_selector(combinator) {
return false;
}

View file

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

View file

@ -1652,7 +1652,6 @@ impl<'a> SelectorVisitor for StylistSelectorVisitor<'a> {
fn visit_complex_selector(
&mut self,
_: SelectorIter<SelectorImpl>,
combinator: Option<Combinator>
) -> bool {
self.needs_revalidation =