[librsvg] Fix formatting errors



commit fa40bd1b01df21294b7f495fdba6f438d0449e20
Author: Linus Unnebäck <linus folkdatorn se>
Date:   Sun Sep 9 00:23:42 2018 +0200

    Fix formatting errors

 rsvg_internals/src/color.rs       | 10 ++++++++--
 rsvg_internals/src/filters/mod.rs |  7 ++++++-
 rsvg_internals/src/font_props.rs  | 10 ++++++++--
 rsvg_internals/src/gradient.rs    |  7 ++++++-
 rsvg_internals/src/length.rs      |  5 ++++-
 rsvg_internals/src/marker.rs      |  7 ++++++-
 rsvg_internals/src/node.rs        | 12 ++++++++++--
 rsvg_internals/src/parsers.rs     |  5 ++++-
 rsvg_internals/src/pattern.rs     |  7 ++++++-
 rsvg_internals/src/state.rs       |  5 ++++-
 rsvg_internals/src/structure.rs   | 14 ++++++++++++--
 11 files changed, 74 insertions(+), 15 deletions(-)
---
diff --git a/rsvg_internals/src/color.rs b/rsvg_internals/src/color.rs
index 85c4fdfb..a43e38a3 100644
--- a/rsvg_internals/src/color.rs
+++ b/rsvg_internals/src/color.rs
@@ -12,7 +12,10 @@ impl Parse for cssparser::Color {
     type Data = ();
     type Err = AttributeError;
 
-    fn parse(parser: &mut Parser<'_, '_>, _: Self::Data) -> Result<cssparser::Color, AttributeError> {
+    fn parse(
+        parser: &mut Parser<'_, '_>,
+        _: Self::Data,
+    ) -> Result<cssparser::Color, AttributeError> {
         cssparser::Color::parse(parser)
             .map_err(|_| AttributeError::Parse(ParseError::new("invalid syntax for color")))
     }
@@ -22,7 +25,10 @@ impl Parse for cssparser::RGBA {
     type Data = ();
     type Err = AttributeError;
 
-    fn parse(parser: &mut Parser<'_, '_>, _: Self::Data) -> Result<cssparser::RGBA, AttributeError> {
+    fn parse(
+        parser: &mut Parser<'_, '_>,
+        _: Self::Data,
+    ) -> Result<cssparser::RGBA, AttributeError> {
         match cssparser::Color::parse(parser) {
             Ok(cssparser::Color::RGBA(rgba)) => Ok(rgba),
             Ok(cssparser::Color::CurrentColor) => Err(AttributeError::Value(
diff --git a/rsvg_internals/src/filters/mod.rs b/rsvg_internals/src/filters/mod.rs
index 4dfba93b..2fe9d9f9 100644
--- a/rsvg_internals/src/filters/mod.rs
+++ b/rsvg_internals/src/filters/mod.rs
@@ -111,7 +111,12 @@ impl Primitive {
 }
 
 impl NodeTrait for Primitive {
-    fn set_atts(&self, node: &RsvgNode, _: *const RsvgHandle, pbag: &PropertyBag<'_>) -> NodeResult {
+    fn set_atts(
+        &self,
+        node: &RsvgNode,
+        _: *const RsvgHandle,
+        pbag: &PropertyBag<'_>,
+    ) -> NodeResult {
         // With ObjectBoundingBox, only fractions and percents are allowed.
         let primitiveunits = node
             .get_parent()
diff --git a/rsvg_internals/src/font_props.rs b/rsvg_internals/src/font_props.rs
index 302c37ec..be61c187 100644
--- a/rsvg_internals/src/font_props.rs
+++ b/rsvg_internals/src/font_props.rs
@@ -76,7 +76,10 @@ impl Parse for FontSizeSpec {
     type Data = ();
     type Err = AttributeError;
 
-    fn parse(parser: &mut Parser<'_, '_>, _: Self::Data) -> Result<FontSizeSpec, ::error::AttributeError> {
+    fn parse(
+        parser: &mut Parser<'_, '_>,
+        _: Self::Data,
+    ) -> Result<FontSizeSpec, ::error::AttributeError> {
         let parser_state = parser.state();
 
         Length::parse(parser, LengthDir::Both)
@@ -250,7 +253,10 @@ impl Parse for SingleFontFamily {
     type Data = ();
     type Err = AttributeError;
 
-    fn parse(parser: &mut Parser<'_, '_>, _: Self::Data) -> Result<SingleFontFamily, AttributeError> {
+    fn parse(
+        parser: &mut Parser<'_, '_>,
+        _: Self::Data,
+    ) -> Result<SingleFontFamily, AttributeError> {
         parse_single_font_family(parser)
             .map_err(|_| AttributeError::from(ParseError::new("expected font family")))
     }
diff --git a/rsvg_internals/src/gradient.rs b/rsvg_internals/src/gradient.rs
index fea92125..37a60749 100644
--- a/rsvg_internals/src/gradient.rs
+++ b/rsvg_internals/src/gradient.rs
@@ -605,7 +605,12 @@ impl NodeGradient {
 }
 
 impl NodeTrait for NodeGradient {
-    fn set_atts(&self, node: &RsvgNode, _: *const RsvgHandle, pbag: &PropertyBag<'_>) -> NodeResult {
+    fn set_atts(
+        &self,
+        node: &RsvgNode,
+        _: *const RsvgHandle,
+        pbag: &PropertyBag<'_>,
+    ) -> NodeResult {
         let mut g = self.gradient.borrow_mut();
 
         let mut x1 = None;
diff --git a/rsvg_internals/src/length.rs b/rsvg_internals/src/length.rs
index 25807b9f..ea35178a 100644
--- a/rsvg_internals/src/length.rs
+++ b/rsvg_internals/src/length.rs
@@ -137,7 +137,10 @@ impl Length {
         }
     }
 
-    pub fn from_cssparser(parser: &mut Parser<'_, '_>, dir: LengthDir) -> Result<Length, AttributeError> {
+    pub fn from_cssparser(
+        parser: &mut Parser<'_, '_>,
+        dir: LengthDir,
+    ) -> Result<Length, AttributeError> {
         let length = {
             let token = parser.next().map_err(|_| {
                 AttributeError::Parse(ParseError::new(
diff --git a/rsvg_internals/src/marker.rs b/rsvg_internals/src/marker.rs
index 9367bd87..a3780543 100644
--- a/rsvg_internals/src/marker.rs
+++ b/rsvg_internals/src/marker.rs
@@ -202,7 +202,12 @@ impl NodeMarker {
 }
 
 impl NodeTrait for NodeMarker {
-    fn set_atts(&self, node: &RsvgNode, _: *const RsvgHandle, pbag: &PropertyBag<'_>) -> NodeResult {
+    fn set_atts(
+        &self,
+        node: &RsvgNode,
+        _: *const RsvgHandle,
+        pbag: &PropertyBag<'_>,
+    ) -> NodeResult {
         // marker element has overflow:hidden
         // https://www.w3.org/TR/SVG/styling.html#UAStyleSheet
         node.set_overflow_hidden();
diff --git a/rsvg_internals/src/node.rs b/rsvg_internals/src/node.rs
index 200b086b..b7b650c7 100644
--- a/rsvg_internals/src/node.rs
+++ b/rsvg_internals/src/node.rs
@@ -375,7 +375,10 @@ impl Node {
         }
     }
 
-    fn parse_conditional_processing_attributes(&self, pbag: &PropertyBag<'_>) -> Result<(), NodeError> {
+    fn parse_conditional_processing_attributes(
+        &self,
+        pbag: &PropertyBag<'_>,
+    ) -> Result<(), NodeError> {
         let mut cond = self.cond.get();
 
         for (_key, attr, value) in pbag.iter() {
@@ -413,7 +416,12 @@ impl Node {
 
     // Sets the node's state from the attributes in the pbag.  Also applies
     // CSS rules in our limited way based on the node's tag/class/id.
-    pub fn parse_style_attributes(&self, handle: *const RsvgHandle, tag: &str, pbag: &PropertyBag<'_>) {
+    pub fn parse_style_attributes(
+        &self,
+        handle: *const RsvgHandle,
+        tag: &str,
+        pbag: &PropertyBag<'_>,
+    ) {
         {
             let mut state = self.state.borrow_mut();
             match state.parse_presentation_attributes(pbag) {
diff --git a/rsvg_internals/src/parsers.rs b/rsvg_internals/src/parsers.rs
index c9b93bcd..4530331f 100644
--- a/rsvg_internals/src/parsers.rs
+++ b/rsvg_internals/src/parsers.rs
@@ -309,7 +309,10 @@ pub enum NumberListError {
     Parse(ParseError),
 }
 
-pub fn number_list(parser: &mut Parser<'_, '_>, length: ListLength) -> Result<Vec<f64>, NumberListError> {
+pub fn number_list(
+    parser: &mut Parser<'_, '_>,
+    length: ListLength,
+) -> Result<Vec<f64>, NumberListError> {
     let n;
 
     match length {
diff --git a/rsvg_internals/src/pattern.rs b/rsvg_internals/src/pattern.rs
index 5c290093..7db7924d 100644
--- a/rsvg_internals/src/pattern.rs
+++ b/rsvg_internals/src/pattern.rs
@@ -170,7 +170,12 @@ impl NodePattern {
 }
 
 impl NodeTrait for NodePattern {
-    fn set_atts(&self, node: &RsvgNode, _: *const RsvgHandle, pbag: &PropertyBag<'_>) -> NodeResult {
+    fn set_atts(
+        &self,
+        node: &RsvgNode,
+        _: *const RsvgHandle,
+        pbag: &PropertyBag<'_>,
+    ) -> NodeResult {
         // pattern element has overflow:hidden
         // https://www.w3.org/TR/SVG/styling.html#UAStyleSheet
         node.set_overflow_hidden();
diff --git a/rsvg_internals/src/state.rs b/rsvg_internals/src/state.rs
index fb11743e..df017b93 100644
--- a/rsvg_internals/src/state.rs
+++ b/rsvg_internals/src/state.rs
@@ -539,7 +539,10 @@ impl State {
         Ok(())
     }
 
-    pub fn parse_presentation_attributes(&mut self, pbag: &PropertyBag<'_>) -> Result<(), NodeError> {
+    pub fn parse_presentation_attributes(
+        &mut self,
+        pbag: &PropertyBag<'_>,
+    ) -> Result<(), NodeError> {
         for (_key, attr, value) in pbag.iter() {
             self.parse_attribute_pair(attr, value, false)?;
         }
diff --git a/rsvg_internals/src/structure.rs b/rsvg_internals/src/structure.rs
index 325bf02b..430b8473 100644
--- a/rsvg_internals/src/structure.rs
+++ b/rsvg_internals/src/structure.rs
@@ -125,7 +125,12 @@ impl NodeSvg {
 }
 
 impl NodeTrait for NodeSvg {
-    fn set_atts(&self, node: &RsvgNode, _: *const RsvgHandle, pbag: &PropertyBag<'_>) -> NodeResult {
+    fn set_atts(
+        &self,
+        node: &RsvgNode,
+        _: *const RsvgHandle,
+        pbag: &PropertyBag<'_>,
+    ) -> NodeResult {
         // SVG element has overflow:hidden
         // https://www.w3.org/TR/SVG/styling.html#UAStyleSheet
         node.set_overflow_hidden();
@@ -389,7 +394,12 @@ impl NodeSymbol {
 }
 
 impl NodeTrait for NodeSymbol {
-    fn set_atts(&self, node: &RsvgNode, _: *const RsvgHandle, pbag: &PropertyBag<'_>) -> NodeResult {
+    fn set_atts(
+        &self,
+        node: &RsvgNode,
+        _: *const RsvgHandle,
+        pbag: &PropertyBag<'_>,
+    ) -> NodeResult {
         // symbol element has overflow:hidden
         // https://www.w3.org/TR/SVG/styling.html#UAStyleSheet
         node.set_overflow_hidden();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]