[librsvg/librsvg-2.44] Tighten an unsafe block



commit e89acaec6be1c7b4cec4eb6982f760f944361b75
Author: Federico Mena Quintero <federico gnome org>
Date:   Fri Sep 14 09:42:42 2018 -0500

    Tighten an unsafe block

 rsvg_internals/src/node.rs | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/rsvg_internals/src/node.rs b/rsvg_internals/src/node.rs
index f498a627..8a8e5636 100644
--- a/rsvg_internals/src/node.rs
+++ b/rsvg_internals/src/node.rs
@@ -504,19 +504,19 @@ impl Node {
                 let target = format!("{}#{}", tag, id);
                 rsvg_lookup_apply_css_style(handle, target.to_glib_none().0, state_ptr);
             }
+        }
 
-            for (_key, attr, value) in pbag.iter() {
-                match attr {
-                    Attribute::Style => {
-                        let mut state = self.state.borrow_mut();
-                        if let Err(e) = state.parse_style_declarations(value) {
-                            self.set_error(e);
-                            break;
-                        }
+        for (_key, attr, value) in pbag.iter() {
+            match attr {
+                Attribute::Style => {
+                    let mut state = self.state.borrow_mut();
+                    if let Err(e) = state.parse_style_declarations(value) {
+                        self.set_error(e);
+                        break;
                     }
-
-                    _ => (),
                 }
+
+                _ => (),
             }
         }
     }


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