Skip to content

Commit

Permalink
appease tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
KodrAus committed Jul 16, 2020
1 parent d101794 commit 1f1cda6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/libstd/lazy.rs
Expand Up @@ -116,10 +116,7 @@ impl<T> SyncOnceCell<T> {
/// Creates a new empty cell.
#[unstable(feature = "once_cell", issue = "68198")]
pub const fn new() -> SyncOnceCell<T> {
SyncOnceCell {
once: Once::new(),
value: UnsafeCell::new(MaybeUninit::uninit()),
}
SyncOnceCell { once: Once::new(), value: UnsafeCell::new(MaybeUninit::uninit()) }
}

/// Gets the reference to the underlying value.
Expand Down
5 changes: 4 additions & 1 deletion src/libstd/sync/once.rs
Expand Up @@ -414,7 +414,10 @@ impl Once {
};
// Run the initialization function, letting it know if we're
// 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);
waiter_queue.set_state_on_drop_to = init_state.set_state_on_drop_to.get();
break;
Expand Down

0 comments on commit 1f1cda6

Please sign in to comment.