Commit 1f1cda6 1 parent d101794 commit 1f1cda6 Copy full SHA for 1f1cda6
File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -116,10 +116,7 @@ impl<T> SyncOnceCell<T> {
116
116
/// Creates a new empty cell.
117
117
#[ unstable( feature = "once_cell" , issue = "68198" ) ]
118
118
pub const fn new ( ) -> SyncOnceCell < T > {
119
- SyncOnceCell {
120
- once : Once :: new ( ) ,
121
- value : UnsafeCell :: new ( MaybeUninit :: uninit ( ) ) ,
122
- }
119
+ SyncOnceCell { once : Once :: new ( ) , value : UnsafeCell :: new ( MaybeUninit :: uninit ( ) ) }
123
120
}
124
121
125
122
/// Gets the reference to the underlying value.
Original file line number Diff line number Diff line change @@ -414,7 +414,10 @@ impl Once {
414
414
} ;
415
415
// Run the initialization function, letting it know if we're
416
416
// poisoned or not.
417
- let init_state = OnceState { poisoned : state_and_queue == POISONED , set_state_on_drop_to : Cell :: new ( COMPLETE ) } ;
417
+ let init_state = OnceState {
418
+ poisoned : state_and_queue == POISONED ,
419
+ set_state_on_drop_to : Cell :: new ( COMPLETE ) ,
420
+ } ;
418
421
init ( & init_state) ;
419
422
waiter_queue. set_state_on_drop_to = init_state. set_state_on_drop_to . get ( ) ;
420
423
break ;
You can’t perform that action at this time.
0 commit comments