Simplify destructor a bit

This commit is contained in:
Steven Fackler 2016-11-05 13:10:50 -07:00
parent 398ab2fbc4
commit ac36d542fd
1 changed files with 1 additions and 4 deletions

View File

@ -125,10 +125,7 @@ impl<T: Stackable> IntoIter<T> {
impl<T: Stackable> Drop for IntoIter<T> {
fn drop(&mut self) {
unsafe {
for i in self.idx..self.stack_len() {
self.get(i);
}
while let Some(_) = self.next() {}
OPENSSL_sk_free(self.stack as *mut _);
}
}