We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efa8ae0 commit bbde19bCopy full SHA for bbde19b
core/src/cell.rs
@@ -450,7 +450,7 @@ impl<T> Cell<T> {
450
// either of these `Cell`s. We also excluded shenanigans like partially overlapping `Cell`s,
451
// so `swap` will just properly copy two full values of type `T` back and forth.
452
unsafe {
453
- ptr::swap_nonoverlapping(self.value.get(), other.value.get(), 1);
+ mem::swap(&mut *self.value.get(), &mut *other.value.get());
454
}
455
456
0 commit comments