aboutsummaryrefslogtreecommitdiffstats
path: root/components/selectors/builder.rs
diff options
context:
space:
mode:
authorAnshul Malik <malikanshul29@gmail.com>2018-09-12 00:24:20 +0530
committerAnshul Malik <malikanshul29@gmail.com>2018-09-12 00:24:20 +0530
commita28c642fc71d30671ac163aaecb9dd4ef0722fdc (patch)
treece66eed24eb5e124a045090ddab8259dd7ab39c4 /components/selectors/builder.rs
parent9667298d2918727e1370e941ae338234b458b6b7 (diff)
downloadservo-a28c642fc71d30671ac163aaecb9dd4ef0722fdc.tar.gz
servo-a28c642fc71d30671ac163aaecb9dd4ef0722fdc.zip
format components/selectors
Diffstat (limited to 'components/selectors/builder.rs')
-rw-r--r--components/selectors/builder.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/components/selectors/builder.rs b/components/selectors/builder.rs
index 29ac822fa03..584a210152f 100644
--- a/components/selectors/builder.rs
+++ b/components/selectors/builder.rs
@@ -161,7 +161,8 @@ struct SelectorBuilderIter<'a, Impl: SelectorImpl> {
impl<'a, Impl: SelectorImpl> ExactSizeIterator for SelectorBuilderIter<'a, Impl> {
fn len(&self) -> usize {
- self.current_simple_selectors.len() + self.rest_of_simple_selectors.len() +
+ self.current_simple_selectors.len() +
+ self.rest_of_simple_selectors.len() +
self.combinators.len()
}
}
@@ -228,7 +229,6 @@ struct Specificity {
element_selectors: u32,
}
-
impl AddAssign for Specificity {
#[inline]
fn add_assign(&mut self, rhs: Self) {
@@ -306,10 +306,9 @@ where
Component::Combinator(ref combinator) => {
unreachable!(
"Found combinator {:?} in simple selectors vector? {:?}",
- combinator,
- builder,
+ combinator, builder,
);
- }
+ },
Component::PseudoElement(..) | Component::LocalName(..) => {
specificity.element_selectors += 1
},
@@ -329,7 +328,7 @@ where
// See: https://github.com/w3c/csswg-drafts/issues/1915
*specificity += Specificity::from(selector.specificity());
}
- }
+ },
Component::ID(..) => {
specificity.id_selectors += 1;
},