We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 437a10f commit f20775aCopy full SHA for f20775a
library/alloc/src/vec.rs
@@ -2179,10 +2179,8 @@ impl<T> InPlaceDrop<T> {
2179
impl<T> Drop for InPlaceDrop<T> {
2180
#[inline]
2181
fn drop(&mut self) {
2182
- if mem::needs_drop::<T>() {
2183
- unsafe {
2184
- ptr::drop_in_place(slice::from_raw_parts_mut(self.inner, self.len()));
2185
- }
+ unsafe {
+ ptr::drop_in_place(slice::from_raw_parts_mut(self.inner, self.len()));
2186
}
2187
2188
@@ -2912,10 +2910,8 @@ impl<T> IntoIter<T> {
2912
2910
2913
2911
2914
fn drop_remaining(&mut self) {
2915
2916
2917
- ptr::drop_in_place(self.as_mut_slice());
2918
+ ptr::drop_in_place(self.as_mut_slice());
2919
2920
self.ptr = self.end;
2921
0 commit comments