From 5e8b798c1222c64adca21dfffd878f1ccbb45a4c Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Thu, 5 Sep 2019 08:19:38 +0900 Subject: [PATCH] fmt --- tokio-timer/src/atomic.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tokio-timer/src/atomic.rs b/tokio-timer/src/atomic.rs index 2a266a8c3c7..3ec7b2f8919 100644 --- a/tokio-timer/src/atomic.rs +++ b/tokio-timer/src/atomic.rs @@ -15,33 +15,33 @@ mod imp { use std::sync::Mutex; #[derive(Debug)] - pub(crate) struct AtomicU64 { + pub(crate) struct AtomicU64 { inner: Mutex, } impl AtomicU64 { - pub(crate) fn new(val: u64) -> AtomicU64 { + pub(crate) fn new(val: u64) -> AtomicU64 { AtomicU64 { inner: Mutex::new(val), } } - pub(crate) fn load(&self, _: Ordering) -> u64 { + pub(crate) fn load(&self, _: Ordering) -> u64 { *self.inner.lock().unwrap() } - pub(crate) fn store(&self, val: u64, _: Ordering) { + pub(crate) fn store(&self, val: u64, _: Ordering) { *self.inner.lock().unwrap() = val; } - pub(crate) fn fetch_or(&self, val: u64, _: Ordering) -> u64 { + pub(crate) fn fetch_or(&self, val: u64, _: Ordering) -> u64 { let mut lock = self.inner.lock().unwrap(); let prev = *lock; *lock = prev | val; prev } - pub(crate) fn compare_and_swap(&self, old: u64, new: u64, _: Ordering) -> u64 { + pub(crate) fn compare_and_swap(&self, old: u64, new: u64, _: Ordering) -> u64 { let mut lock = self.inner.lock().unwrap(); let prev = *lock;