mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove unused generic from push_applicable_declarations
This function is only ever used with one type. This gets rid of the only use of the `smallvec::VecLike` trait, which we may want to deprecate. (If we do need to make this function generic in the future, we can do it using standard traits instead.)
This commit is contained in:
parent
6d49ec83a1
commit
0009ccd330
2 changed files with 12 additions and 22 deletions
|
@ -6,7 +6,7 @@
|
|||
//! name, ids and hash.
|
||||
|
||||
use {Atom, LocalName};
|
||||
use applicable_declarations::ApplicableDeclarationBlock;
|
||||
use applicable_declarations::ApplicableDeclarationList;
|
||||
use context::QuirksMode;
|
||||
use dom::TElement;
|
||||
use fallible::FallibleVec;
|
||||
|
@ -18,7 +18,7 @@ use rule_tree::CascadeLevel;
|
|||
use selector_parser::SelectorImpl;
|
||||
use selectors::matching::{matches_selector, MatchingContext, ElementSelectorFlags};
|
||||
use selectors::parser::{Component, Combinator, SelectorIter};
|
||||
use smallvec::{SmallVec, VecLike};
|
||||
use smallvec::SmallVec;
|
||||
use std::hash::{BuildHasherDefault, Hash, Hasher};
|
||||
use stylist::Rule;
|
||||
|
||||
|
@ -146,11 +146,11 @@ impl SelectorMap<Rule> {
|
|||
///
|
||||
/// Extract matching rules as per element's ID, classes, tag name, etc..
|
||||
/// Sort the Rules at the end to maintain cascading order.
|
||||
pub fn get_all_matching_rules<E, V, F>(
|
||||
pub fn get_all_matching_rules<E, F>(
|
||||
&self,
|
||||
element: &E,
|
||||
rule_hash_target: &E,
|
||||
matching_rules_list: &mut V,
|
||||
matching_rules_list: &mut ApplicableDeclarationList,
|
||||
context: &mut MatchingContext<E::Impl>,
|
||||
quirks_mode: QuirksMode,
|
||||
flags_setter: &mut F,
|
||||
|
@ -158,7 +158,6 @@ impl SelectorMap<Rule> {
|
|||
)
|
||||
where
|
||||
E: TElement,
|
||||
V: VecLike<ApplicableDeclarationBlock>,
|
||||
F: FnMut(&E, ElementSelectorFlags),
|
||||
{
|
||||
if self.is_empty() {
|
||||
|
@ -210,17 +209,16 @@ impl SelectorMap<Rule> {
|
|||
}
|
||||
|
||||
/// Adds rules in `rules` that match `element` to the `matching_rules` list.
|
||||
fn get_matching_rules<E, V, F>(
|
||||
fn get_matching_rules<E, F>(
|
||||
element: &E,
|
||||
rules: &[Rule],
|
||||
matching_rules: &mut V,
|
||||
matching_rules: &mut ApplicableDeclarationList,
|
||||
context: &mut MatchingContext<E::Impl>,
|
||||
flags_setter: &mut F,
|
||||
cascade_level: CascadeLevel,
|
||||
)
|
||||
where
|
||||
E: TElement,
|
||||
V: VecLike<ApplicableDeclarationBlock>,
|
||||
F: FnMut(&E, ElementSelectorFlags),
|
||||
{
|
||||
for rule in rules {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue