about summary refs log tree commit diff
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2015-09-20 22:15:39 +0300
committerwhitequark <whitequark@whitequark.org>2015-09-20 22:15:39 +0300
commit6beb4ba1aaecb59fdfdc676434b5a3b17a4b5bfc (patch)
treeea09570c35ced48c140136fa4a5344b9f49997b3
parentc5fa7776dff913dd75fed6f4e7ed483f0e75e367 (diff)
downloadrust-6beb4ba1aaecb59fdfdc676434b5a3b17a4b5bfc.tar.gz
rust-6beb4ba1aaecb59fdfdc676434b5a3b17a4b5bfc.zip
Fix style.
-rw-r--r--src/libcollections/vec.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs
index fac84617943..ddab16493f0 100644
--- a/src/libcollections/vec.rs
+++ b/src/libcollections/vec.rs
@@ -1322,9 +1322,11 @@ impl<T> Drop for Vec<T> {
         // OK because exactly when this stops being a valid assumption, we
         // don't need unsafe_no_drop_flag shenanigans anymore.
         if self.buf.unsafe_no_drop_flag_needs_drop() {
-            if unsafe { needs_drop::<T>() } {
-                for x in self.iter_mut() {
-                    unsafe { drop_in_place(x); }
+            unsafe {
+                if needs_drop::<T>() {
+                    for x in self.iter_mut() {
+                        drop_in_place(x);
+                    }
                 }
             }
         }