Skip to content

Commit

Permalink
Simplify destructor a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Nov 5, 2016
1 parent 398ab2f commit ac36d54
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions openssl/src/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 _);
}
}
Expand Down

0 comments on commit ac36d54

Please sign in to comment.