appease tidy
This commit is contained in:
parent
d1017940d7
commit
1f1cda65d9
2 changed files with 5 additions and 5 deletions
|
@ -116,10 +116,7 @@ impl<T> SyncOnceCell<T> {
|
||||||
/// Creates a new empty cell.
|
/// Creates a new empty cell.
|
||||||
#[unstable(feature = "once_cell", issue = "68198")]
|
#[unstable(feature = "once_cell", issue = "68198")]
|
||||||
pub const fn new() -> SyncOnceCell<T> {
|
pub const fn new() -> SyncOnceCell<T> {
|
||||||
SyncOnceCell {
|
SyncOnceCell { once: Once::new(), value: UnsafeCell::new(MaybeUninit::uninit()) }
|
||||||
once: Once::new(),
|
|
||||||
value: UnsafeCell::new(MaybeUninit::uninit()),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets the reference to the underlying value.
|
/// Gets the reference to the underlying value.
|
||||||
|
|
|
@ -414,7 +414,10 @@ impl Once {
|
||||||
};
|
};
|
||||||
// Run the initialization function, letting it know if we're
|
// Run the initialization function, letting it know if we're
|
||||||
// poisoned or not.
|
// poisoned or not.
|
||||||
let init_state = OnceState { poisoned: state_and_queue == POISONED, set_state_on_drop_to: Cell::new(COMPLETE) };
|
let init_state = OnceState {
|
||||||
|
poisoned: state_and_queue == POISONED,
|
||||||
|
set_state_on_drop_to: Cell::new(COMPLETE),
|
||||||
|
};
|
||||||
init(&init_state);
|
init(&init_state);
|
||||||
waiter_queue.set_state_on_drop_to = init_state.set_state_on_drop_to.get();
|
waiter_queue.set_state_on_drop_to = init_state.set_state_on_drop_to.get();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue