]> git.lizzy.rs Git - rust.git/commitdiff
appease tidy
authorAshley Mannix <ashleymannix@live.com.au>
Tue, 30 Jun 2020 08:36:10 +0000 (18:36 +1000)
committerAshley Mannix <ashleymannix@live.com.au>
Thu, 16 Jul 2020 21:25:32 +0000 (07:25 +1000)
src/libstd/lazy.rs
src/libstd/sync/once.rs

index 761cc2b439f679821bcd83e8431a61603178c2db..094eff17f89160d6ee897d362b95182315b47183 100644 (file)
@@ -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.
index 1fce5dc03522489fc4b580a83e7d42f1fc9d6379..64260990824b86fdc9e51afeed8aeca6dea34ff9 100644 (file)
@@ -414,7 +414,10 @@ fn call_inner(&self, ignore_poisoning: bool, init: &mut dyn FnMut(&OnceState)) {
                     };
                     // 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;