autocommit 2022-01-31 23:45:42 CET
This commit is contained in:
parent
865d5f295d
commit
f2117256b9
33 changed files with 784 additions and 178 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue