remove unnecessary transmutes
This commit is contained in:
parent
29cdf58861
commit
befc561fa4
4 changed files with 8 additions and 28 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue