On Wed, Jun 03, 2026 at 03:42:34PM -0400, Lyude Paul wrote: > This function simply drops the contents of the SetOnce, given a mutable > reference - since that proves we have exclusive access to the SetOnce. > Additionally, update the invariants for SetOnce to make it clear as to why > this is safe. > > Signed-off-by: Lyude Paul <[email protected]>
This isn't needed, you can just do:
unsafe { (*this).sgt_res = SetOnce::new() };
