Suggest mem::forget if mem::ManuallyDrop::new isn't used
I think this communicates the intent better, and is shorter anyway.
This commit is contained in:
@@ -293,7 +293,7 @@ impl<T> SyncOnceCell<T> {
|
||||
|
||||
// Don't drop this `SyncOnceCell`. We just moved out one of the fields, but didn't set
|
||||
// the state to uninitialized.
|
||||
mem::ManuallyDrop::new(self);
|
||||
mem::forget(self);
|
||||
inner
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user