Unnecessary iteration in BTreeMap::drop
`IntoIter::drop` already iterates.
This commit is contained in:
parent
e703b33e3e
commit
f97b3f08cd
@ -141,8 +141,7 @@ pub struct BTreeMap<K, V> {
|
||||
unsafe impl<#[may_dangle] K, #[may_dangle] V> Drop for BTreeMap<K, V> {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
for _ in ptr::read(self).into_iter() {
|
||||
}
|
||||
drop(ptr::read(self).into_iter());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user