Add more from the std
This commit is contained in:
@@ -39,6 +39,11 @@ impl Once {
|
||||
Once { state: Cell::new(State::Incomplete) }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub const fn new_complete() -> Once {
|
||||
Once { state: Cell::new(State::Complete) }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn is_completed(&self) -> bool {
|
||||
self.state.get() == State::Complete
|
||||
|
||||
Reference in New Issue
Block a user