Created
August 4, 2016 19:33
-
-
Save Amanieu/2ef2294e4547df6d7dd3c25452399234 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mem::transmute_copy(&(*(dst as *const AtomicU8)).swap(mem::transmute_copy(&val), order)) | |
----- | |
let atomic = &*(dst as *const AtomicU8); | |
let new = mem::transmute_copy(&val); | |
let old = atomic.swap(new); | |
mem::transmute_copy(&old) | |
ptr::read(&(*(dst as *const AtomicU8)).swap(ptr::read(&val as *const _ as *const u8), order) as *const _ as *const u8) | |
----- | |
let atomic = &*(dst as *const AtomicU8); | |
let new = ptr::read(&val as *const _ as *const u8); | |
let old = atomic.swap(new); | |
ptr::read(&old as *const u8 as *const _) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment