autocommit 2022-02-11 02:28:11 CET
This commit is contained in:
parent
83c3fb99f9
commit
9b8e1ac29f
63 changed files with 690 additions and 122 deletions
|
|
@ -1,4 +1,5 @@
|
|||
use std::cell::Cell;
|
||||
use std::fmt::{Debug, Formatter};
|
||||
use std::ops::{Add, BitAnd, BitOr, Sub};
|
||||
|
||||
#[derive(Default)]
|
||||
|
|
@ -6,6 +7,12 @@ pub struct NumCell<T> {
|
|||
t: Cell<T>,
|
||||
}
|
||||
|
||||
impl<T: Copy + Debug> Debug for NumCell<T> {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
self.t.get().fmt(f)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> NumCell<T> {
|
||||
#[inline(always)]
|
||||
pub fn new(t: T) -> Self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue