mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Use Boxed slices for Empty and MozAny.
MozReview-Commit-ID: CmVK3u0vYn0
This commit is contained in:
parent
6d66ec5e11
commit
cf06e2bf1e
2 changed files with 7 additions and 7 deletions
|
@ -217,7 +217,7 @@ macro_rules! pseudo_class_name {
|
|||
///
|
||||
/// TODO(emilio): We disallow combinators and pseudos here, so we
|
||||
/// should use SimpleSelector instead
|
||||
MozAny(Vec<ComplexSelector<SelectorImpl>>),
|
||||
MozAny(Box<[ComplexSelector<SelectorImpl>]>),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ impl SelectorMethods for NonTSPseudoClass {
|
|||
where V: SelectorVisitor<Impl = Self::Impl>,
|
||||
{
|
||||
if let NonTSPseudoClass::MozAny(ref selectors) = *self {
|
||||
for selector in selectors {
|
||||
for selector in selectors.iter() {
|
||||
if !selector.visit(visitor) {
|
||||
return false;
|
||||
}
|
||||
|
@ -401,7 +401,7 @@ impl<'a> ::selectors::Parser for SelectorParser<'a> {
|
|||
if selectors.iter().flat_map(|x| x.iter_raw()).any(|s| s.is_combinator()) {
|
||||
return Err(())
|
||||
}
|
||||
NonTSPseudoClass::MozAny(selectors)
|
||||
NonTSPseudoClass::MozAny(selectors.into_boxed_slice())
|
||||
}
|
||||
_ => return Err(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue