1
0
Fork 0
forked from wry/wry

autocommit 2022-01-31 23:45:42 CET

This commit is contained in:
Julian Orth 2022-01-31 23:45:42 +01:00
parent 865d5f295d
commit f2117256b9
33 changed files with 784 additions and 178 deletions

View file

@ -21,9 +21,9 @@ impl<T: UnsafeCellCloneSafe> CloneCell<T> {
}
#[inline(always)]
pub fn set(&self, t: T) {
pub fn set(&self, t: T) -> T {
unsafe {
let _ = mem::replace(self.data.get().deref_mut(), t);
mem::replace(self.data.get().deref_mut(), t)
}
}