[librsvg] cargo fmt



commit 6f39c92b876387b84ada148f3b15a6aa514f0cff
Author: Jordan Petridis <jordanpetridis protonmail com>
Date:   Thu Jul 26 04:27:38 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 886bed0c..7a4c501e 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]