about summary refs log tree commit diff
path: root/src/libstd/sys_common
diff options
context:
space:
mode:
authorZack M. Davis <code@zackmdavis.net>2017-08-06 22:54:09 -0700
committerZack M. Davis <code@zackmdavis.net>2017-08-15 15:29:17 -0700
commit1b6c9605e41b7c7dc23e0e6f633f05912d0463dd (patch)
tree2482313e8e0761fd8e3ecddc8baad7bf96689b07 /src/libstd/sys_common
parent82be83cf744611a016fb09ae1afbffc04b3ed2e1 (diff)
use field init shorthand EVERYWHERE
Like #43008 (f668999), but _much more aggressive_.
Diffstat (limited to 'src/libstd/sys_common')
-rw-r--r--src/libstd/sys_common/thread_info.rs4
-rw-r--r--src/libstd/sys_common/thread_local.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys_common/thread_info.rs b/src/libstd/sys_common/thread_info.rs
index 2abb8afa828..7970042b1d6 100644
--- a/src/libstd/sys_common/thread_info.rs
+++ b/src/libstd/sys_common/thread_info.rs
@@ -45,7 +45,7 @@ pub fn stack_guard() -> Option<usize> {
 pub fn set(stack_guard: Option<usize>, thread: Thread) {
     THREAD_INFO.with(|c| assert!(c.borrow().is_none()));
     THREAD_INFO.with(move |c| *c.borrow_mut() = Some(ThreadInfo{
-        stack_guard: stack_guard,
-        thread: thread,
+        stack_guard,
+        thread,
     }));
 }
diff --git a/src/libstd/sys_common/thread_local.rs b/src/libstd/sys_common/thread_local.rs
index 1f889c70707..87ffd304e1a 100644
--- a/src/libstd/sys_common/thread_local.rs
+++ b/src/libstd/sys_common/thread_local.rs
@@ -128,7 +128,7 @@ impl StaticKey {
     pub const fn new(dtor: Option<unsafe extern fn(*mut u8)>) -> StaticKey {
         StaticKey {
             key: atomic::AtomicUsize::new(0),
-            dtor: dtor
+            dtor,
         }
     }