about summary refs log tree commit diff
path: root/compiler/rustc_thread_pool/src/worker_local.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_thread_pool/src/worker_local.rs')
-rw-r--r--compiler/rustc_thread_pool/src/worker_local.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/compiler/rustc_thread_pool/src/worker_local.rs b/compiler/rustc_thread_pool/src/worker_local.rs
index 85d51687c19..d108c91f9ee 100644
--- a/compiler/rustc_thread_pool/src/worker_local.rs
+++ b/compiler/rustc_thread_pool/src/worker_local.rs
@@ -1,8 +1,9 @@
-use crate::registry::{Registry, WorkerThread};
 use std::fmt;
 use std::ops::Deref;
 use std::sync::Arc;
 
+use crate::registry::{Registry, WorkerThread};
+
 #[repr(align(64))]
 #[derive(Debug)]
 struct CacheAligned<T>(T);
@@ -27,9 +28,7 @@ impl<T> WorkerLocal<T> {
     pub fn new<F: FnMut(usize) -> T>(mut initial: F) -> WorkerLocal<T> {
         let registry = Registry::current();
         WorkerLocal {
-            locals: (0..registry.num_threads())
-                .map(|i| CacheAligned(initial(i)))
-                .collect(),
+            locals: (0..registry.num_threads()).map(|i| CacheAligned(initial(i))).collect(),
             registry,
         }
     }
@@ -62,9 +61,7 @@ impl<T> WorkerLocal<Vec<T>> {
 
 impl<T: fmt::Debug> fmt::Debug for WorkerLocal<T> {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        f.debug_struct("WorkerLocal")
-            .field("registry", &self.registry.id())
-            .finish()
+        f.debug_struct("WorkerLocal").field("registry", &self.registry.id()).finish()
     }
 }