aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2021-02-25 09:11:54 +0100
committerSimon Sapin <simon.sapin@exyr.org>2021-02-25 20:31:42 +0100
commit479a42a980e77ffc17559fd0e2a86fb4b6f3d6e8 (patch)
treec372cfacb36bc97b51457482d7e3ffc837296be6
parent2dd3c05479b2c1bdb3a19880b211ee82cbc0fd78 (diff)
downloadservo-479a42a980e77ffc17559fd0e2a86fb4b6f3d6e8.tar.gz
servo-479a42a980e77ffc17559fd0e2a86fb4b6f3d6e8.zip
Reformat with rustfmt 1.4.36-nightly (7de6968 2021-02-07)
-rw-r--r--components/script/dom/treewalker.rs2
-rw-r--r--components/style/gecko/selector_parser.rs11
-rw-r--r--components/style/servo/selector_parser.rs4
-rw-r--r--components/style/values/generics/image.rs8
-rw-r--r--components/style/values/specified/font.rs16
-rw-r--r--components/style/values/specified/motion.rs4
6 files changed, 31 insertions, 14 deletions
diff --git a/components/script/dom/treewalker.rs b/components/script/dom/treewalker.rs
index 7d23d81bcf0..86aa97466a7 100644
--- a/components/script/dom/treewalker.rs
+++ b/components/script/dom/treewalker.rs
@@ -467,7 +467,7 @@ impl<'a> Iterator for &'a TreeWalker {
// which cannot produce an Err result.
{
unreachable!()
- },
+ }
}
}
}
diff --git a/components/style/gecko/selector_parser.rs b/components/style/gecko/selector_parser.rs
index fd0494fa4b4..64e62badf3b 100644
--- a/components/style/gecko/selector_parser.rs
+++ b/components/style/gecko/selector_parser.rs
@@ -198,11 +198,12 @@ impl NonTSPseudoClass {
/// revalidation.
pub fn needs_cache_revalidation(&self) -> bool {
self.state_flag().is_empty() &&
- !matches!(*self,
- // :-moz-any is handled by the revalidation visitor walking
- // the things inside it; it does not need to cause
- // revalidation on its own.
- NonTSPseudoClass::MozAny(_) |
+ !matches!(
+ *self,
+ // :-moz-any is handled by the revalidation visitor walking
+ // the things inside it; it does not need to cause
+ // revalidation on its own.
+ NonTSPseudoClass::MozAny(_) |
// :dir() depends on state only, but doesn't use state_flag
// because its semantics don't quite match. Nevertheless, it
// doesn't need cache revalidation, because we already compare
diff --git a/components/style/servo/selector_parser.rs b/components/style/servo/selector_parser.rs
index a3a3ca7c2b8..66e87b339d4 100644
--- a/components/style/servo/selector_parser.rs
+++ b/components/style/servo/selector_parser.rs
@@ -29,7 +29,9 @@ use style_traits::{ParseError, StyleParseErrorKind};
/// A pseudo-element, both public and private.
///
/// NB: If you add to this list, be sure to update `each_simple_pseudo_element` too.
-#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, ToShmem)]
+#[derive(
+ Clone, Copy, Debug, Deserialize, Eq, Hash, MallocSizeOf, PartialEq, Serialize, ToShmem,
+)]
#[allow(missing_docs)]
#[repr(usize)]
pub enum PseudoElement {
diff --git a/components/style/values/generics/image.rs b/components/style/values/generics/image.rs
index 6f550bc21f6..9376cad2c2e 100644
--- a/components/style/values/generics/image.rs
+++ b/components/style/values/generics/image.rs
@@ -102,7 +102,9 @@ pub enum GenericGradient<
pub use self::GenericGradient as Gradient;
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToResolvedValue, ToShmem)]
+#[derive(
+ Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToResolvedValue, ToShmem,
+)]
#[repr(u8)]
/// Whether we used the modern notation or the compatibility `-webkit`, `-moz` prefixes.
pub enum GradientCompatMode {
@@ -129,7 +131,9 @@ pub enum GenericEndingShape<NonNegativeLength, NonNegativeLengthPercentage> {
pub use self::GenericEndingShape as EndingShape;
/// A circle shape.
-#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToResolvedValue, ToShmem)]
+#[derive(
+ Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToResolvedValue, ToShmem,
+)]
#[repr(C, u8)]
pub enum GenericCircle<NonNegativeLength> {
/// A circle radius.
diff --git a/components/style/values/specified/font.rs b/components/style/values/specified/font.rs
index 6fee8c2e770..49368548f98 100644
--- a/components/style/values/specified/font.rs
+++ b/components/style/values/specified/font.rs
@@ -79,7 +79,9 @@ pub const MAX_FONT_WEIGHT: f32 = 1000.;
/// A specified font-weight value.
///
/// https://drafts.csswg.org/css-fonts-4/#propdef-font-weight
-#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
+#[derive(
+ Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem,
+)]
pub enum FontWeight {
/// `<font-weight-absolute>`
Absolute(AbsoluteFontWeight),
@@ -317,7 +319,9 @@ impl SpecifiedFontStyle {
}
/// The specified value of the `font-style` property.
-#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
+#[derive(
+ Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem,
+)]
#[allow(missing_docs)]
pub enum FontStyle {
Specified(SpecifiedFontStyle),
@@ -366,7 +370,9 @@ pub enum FontStretch {
}
/// A keyword value for `font-stretch`.
-#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
+#[derive(
+ Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem,
+)]
#[allow(missing_docs)]
pub enum FontStretchKeyword {
Normal,
@@ -727,7 +733,9 @@ impl Parse for FamilyName {
}
}
-#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
+#[derive(
+ Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem,
+)]
/// Preserve the readability of text when font fallback occurs
pub enum FontSizeAdjust {
/// None variant
diff --git a/components/style/values/specified/motion.rs b/components/style/values/specified/motion.rs
index 7831b78afe6..944a0110840 100644
--- a/components/style/values/specified/motion.rs
+++ b/components/style/values/specified/motion.rs
@@ -102,7 +102,9 @@ impl Parse for OffsetPath {
}
/// The direction of offset-rotate.
-#[derive(Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)]
+#[derive(
+ Clone, Copy, Debug, MallocSizeOf, Parse, PartialEq, SpecifiedValueInfo, ToCss, ToShmem,
+)]
#[repr(u8)]
pub enum OffsetRotateDirection {
/// Unspecified direction keyword.