[librsvg] Remove an unused unsafe block



commit df252a8409a30985b7b75afd20e540dfc67f60c4
Author: Federico Mena Quintero <federico gnome org>
Date:   Mon Feb 20 16:03:39 2017 -0600

    Remove an unused unsafe block

 rust/src/node.rs |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/rust/src/node.rs b/rust/src/node.rs
index e20d1e0..483c67e 100644
--- a/rust/src/node.rs
+++ b/rust/src/node.rs
@@ -255,11 +255,11 @@ pub extern fn rsvg_node_foreach_child (raw_node: *const RsvgNode, func: NodeFore
     let node: &RsvgNode = unsafe { & *raw_node };
 
     for child in &*node.children.borrow () {
-        let boxed_child = box_node (child.clone ());
+        let mut boxed_child = box_node (child.clone ());
 
         let next = unsafe { func (boxed_child, data) };
 
-        unsafe { rsvg_node_unref (boxed_child); }
+        boxed_child = rsvg_node_unref (boxed_child);
 
         if !next {
             break;


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