Skip to content

Commit 6beb4ba

Browse files
committed
Fix style.
1 parent c5fa777 commit 6beb4ba

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/libcollections/vec.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,9 +1322,11 @@ impl<T> Drop for Vec<T> {
13221322
// OK because exactly when this stops being a valid assumption, we
13231323
// don't need unsafe_no_drop_flag shenanigans anymore.
13241324
if self.buf.unsafe_no_drop_flag_needs_drop() {
1325-
if unsafe { needs_drop::<T>() } {
1326-
for x in self.iter_mut() {
1327-
unsafe { drop_in_place(x); }
1325+
unsafe {
1326+
if needs_drop::<T>() {
1327+
for x in self.iter_mut() {
1328+
drop_in_place(x);
1329+
}
13281330
}
13291331
}
13301332
}

0 commit comments

Comments
 (0)