autocommit 2022-01-25 16:45:44 CET
This commit is contained in:
parent
0336bf3bde
commit
c340df0d08
59 changed files with 3085 additions and 1710 deletions
|
|
@ -12,13 +12,18 @@ impl<T> NumCell<T> {
|
|||
Self { t: Cell::new(t) }
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn set(&self, n: T) {
|
||||
let _ = self.t.replace(n);
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn replace(&self, n: T) -> T {
|
||||
self.t.replace(n)
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn load(&self) -> T
|
||||
pub fn get(&self) -> T
|
||||
where
|
||||
T: Copy,
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue