style: Remove SelectorAndHashes.

This commit is contained in:
Emilio Cobos Álvarez 2017-07-13 04:01:44 +02:00
parent dee4aea264
commit 445b8fb3e8
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 1 additions and 27 deletions

View file

@ -176,26 +176,6 @@ pub trait Parser<'i> {
}
}
#[derive(PartialEq, Eq, Clone, Debug)]
pub struct SelectorAndHashes<Impl: SelectorImpl> {
pub selector: Selector<Impl>,
pub hashes: AncestorHashes,
}
impl<Impl: SelectorImpl> SelectorAndHashes<Impl> {
pub fn new(selector: Selector<Impl>) -> Self {
let hashes = AncestorHashes::new(&selector);
Self::new_with_hashes(selector, hashes)
}
pub fn new_with_hashes(selector: Selector<Impl>, hashes: AncestorHashes) -> Self {
SelectorAndHashes {
selector: selector,
hashes: hashes,
}
}
}
#[derive(PartialEq, Eq, Clone, Debug)]
pub struct SelectorList<Impl: SelectorImpl>(pub Vec<Selector<Impl>>);

View file

@ -14,7 +14,7 @@ use pdqsort::sort_by;
use rule_tree::CascadeLevel;
use selector_parser::SelectorImpl;
use selectors::matching::{matches_selector, MatchingContext, ElementSelectorFlags};
use selectors::parser::{Component, Combinator, SelectorAndHashes, SelectorIter};
use selectors::parser::{Component, Combinator, SelectorIter};
use selectors::parser::LocalName as LocalNameSelector;
use smallvec::VecLike;
use std::collections::HashMap;
@ -28,12 +28,6 @@ pub trait SelectorMapEntry : Sized + Clone {
fn selector(&self) -> SelectorIter<SelectorImpl>;
}
impl SelectorMapEntry for SelectorAndHashes<SelectorImpl> {
fn selector(&self) -> SelectorIter<SelectorImpl> {
self.selector.iter()
}
}
/// Map element data to selector-providing objects for which the last simple
/// selector starts with them.
///