I'm looking at using Once as a sort of dirty flag, and it'd be useful to have a method to create a Once that's already done (i.e. marked as already clean). E.g.:
impl Once {
#[inline]
pub const fn new_done() -> Once {
Once(AtomicU8::new(DONE_BIT))
}
The method should be named new_completed for consistency with is_completed. Please send a PR to the standard library as well if you plan on implementing this. I'm happy to accept a PR here.
I'm looking at using Once as a sort of dirty flag, and it'd be useful to have a method to create a Once that's already done (i.e. marked as already clean). E.g.: