[librsvg] cargo fmt



commit b8fef500d1c44a29126fef6c3f4c85a47fd314aa
Author: Jordan Petridis <jordanpetridis protonmail com>
Date:   Sun Jul 15 15:54:36 2018 +0300

    cargo fmt

 rsvg_internals/src/state.rs | 33 +++++++++++++++------------------
 1 file changed, 15 insertions(+), 18 deletions(-)
---
diff --git a/rsvg_internals/src/state.rs b/rsvg_internals/src/state.rs
index 87c4b7bf..da43d3d7 100644
--- a/rsvg_internals/src/state.rs
+++ b/rsvg_internals/src/state.rs
@@ -1550,33 +1550,30 @@ pub fn parse_style_attrs(
                     // tag.class#id
                     if let Some(id) = node.get_id() {
                         let target = format!("{}.{}#{}", tag, cls, id);
-                        found = found
-                            || from_glib(rsvg_lookup_apply_css_style(
-                                handle,
-                                target.to_glib_none().0,
-                                to_c_mut(state),
-                            ));
+                        found = found || from_glib(rsvg_lookup_apply_css_style(
+                            handle,
+                            target.to_glib_none().0,
+                            to_c_mut(state),
+                        ));
                     }
 
                     // .class#id
                     if let Some(id) = node.get_id() {
                         let target = format!(".{}#{}", cls, id);
-                        found = found
-                            || from_glib(rsvg_lookup_apply_css_style(
-                                handle,
-                                target.to_glib_none().0,
-                                to_c_mut(state),
-                            ));
-                    }
-
-                    // tag.class
-                    let target = format!("{}.{}", tag, cls);
-                    found = found
-                        || from_glib(rsvg_lookup_apply_css_style(
+                        found = found || from_glib(rsvg_lookup_apply_css_style(
                             handle,
                             target.to_glib_none().0,
                             to_c_mut(state),
                         ));
+                    }
+
+                    // tag.class
+                    let target = format!("{}.{}", tag, cls);
+                    found = found || from_glib(rsvg_lookup_apply_css_style(
+                        handle,
+                        target.to_glib_none().0,
+                        to_c_mut(state),
+                    ));
 
                     if !found {
                         // didn't find anything more specific, just apply the class style


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