Simplify destructor a bit
This commit is contained in:
parent
398ab2fbc4
commit
ac36d542fd
|
|
@ -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 _);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue