mirror of
https://github.com/Noratrieb/datastructures.git
synced 2026-01-16 18:15:04 +01:00
fixed #1 IntoIter memory leak
This commit is contained in:
parent
ffde519487
commit
3102f61870
1 changed files with 6 additions and 0 deletions
|
|
@ -447,6 +447,12 @@ impl<T> IntoIter<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<T> Drop for IntoIter<T> {
|
||||||
|
fn drop(&mut self) {
|
||||||
|
while let Some(_) = self.next() {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<T> Iterator for IntoIter<T> {
|
impl<T> Iterator for IntoIter<T> {
|
||||||
type Item = T;
|
type Item = T;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue