Rollup merge of #40790 - stepancheg:btreemap-drop, r=alexcrichton

Unnecessary iteration in BTreeMap::drop

`IntoIter::drop` already iterates.
This commit is contained in:
Corey Farwell 2017-03-24 18:13:14 -05:00 committed by GitHub
commit eb6f09ce24

View File

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