]> git.lizzy.rs Git - rust.git/commitdiff
Remove unsafe block around boxed::into_raw() as it is now safe
authorMichael Layzell <michael@thelayzells.com>
Mon, 25 May 2015 18:44:22 +0000 (14:44 -0400)
committerMichael Layzell <michael@thelayzells.com>
Mon, 25 May 2015 18:44:22 +0000 (14:44 -0400)
src/libstd/sync/mpsc/spsc_queue.rs

index b72da91c0a075cffd1ed7a4421070ae980358699..a0ed52d4d3c875ba3807c22dc7c4d4f638872141 100644 (file)
@@ -80,12 +80,10 @@ unsafe impl<T: Send> Sync for Queue<T> { }
 
 impl<T> Node<T> {
     fn new() -> *mut Node<T> {
-        unsafe {
-            boxed::into_raw(box Node {
-                value: None,
-                next: AtomicPtr::new(ptr::null_mut::<Node<T>>()),
-            })
-        }
+        boxed::into_raw(box Node {
+            value: None,
+            next: AtomicPtr::new(ptr::null_mut::<Node<T>>()),
+        })
     }
 }