use mem::swap instead of ptr::swap_nonoverlapping
This commit is contained in:
parent
26cfd211fb
commit
e7a1e4271d
1 changed files with 1 additions and 1 deletions
|
@ -450,7 +450,7 @@ impl<T> Cell<T> {
|
|||
// either of these `Cell`s. We also excluded shenanigans like partially overlapping `Cell`s,
|
||||
// so `swap` will just properly copy two full values of type `T` back and forth.
|
||||
unsafe {
|
||||
ptr::swap_nonoverlapping(self.value.get(), other.value.get(), 1);
|
||||
mem::swap(&mut *self.value.get(), &mut *other.value.get());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue