remove unnecessary transmutes

This commit is contained in:
Daniel Micay 2013-09-17 11:44:59 -04:00
parent 29cdf58861
commit befc561fa4
4 changed files with 8 additions and 28 deletions

View file

@ -339,13 +339,7 @@ impl<T> AtomicOption<T> {
#[unsafe_destructor]
impl<T> Drop for AtomicOption<T> {
fn drop(&mut self) {
// This will ensure that the contained data is
// destroyed, unless it's null.
unsafe {
// FIXME(#4330) Need self by value to get mutability.
let this : &mut AtomicOption<T> = cast::transmute(self);
let _ = this.take(SeqCst);
}
let _ = self.take(SeqCst);
}
}