Fix style.

This commit is contained in:
whitequark 2015-09-20 22:15:39 +03:00
parent c5fa7776df
commit 6beb4ba1aa

View File

@ -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);
}
}
}
}