Skip to content

Commit

Permalink
API: Deprecate .dispose(), it no longer has a purpose without nodrop
Browse files Browse the repository at this point in the history
  • Loading branch information
bluss committed Oct 9, 2019
1 parent 2a376d9 commit bf64376
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,8 @@ impl<A: Array> ArrayVec<A> {
}
}

/// Dispose of `self` without the overwriting that is needed in Drop.
/// Dispose of `self` (same as drop)
#[deprecated="Use std::mem::drop instead, if at all needed."]
pub fn dispose(mut self) {
self.clear();
mem::forget(self);
Expand Down

0 comments on commit bf64376

Please sign in to comment.