瀏覽代碼

Fix various formatting issues

Moses Miller 7 年之前
父節點
當前提交
d14d0b5965
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 1 1
      src/time/src/constants.rs
  2. 2 1
      src/time/src/lib.rs

+ 1 - 1
src/time/src/constants.rs

@@ -48,4 +48,4 @@ pub(crate) const CLOCK_MONOTONIC: clockid_t = 1;
 pub(crate) const CLOCK_PROCESS_CPUTIME_ID: clockid_t = 2;
 pub(crate) const CLOCK_PROCESS_CPUTIME_ID: clockid_t = 2;
 pub(crate) const CLOCK_THREAD_CPUTIME_ID: clockid_t = 3;
 pub(crate) const CLOCK_THREAD_CPUTIME_ID: clockid_t = 3;
 
 
-pub(crate) const CLOCKS_PER_SEC: time_t = 1_000_000;
+pub(crate) const CLOCKS_PER_SEC: time_t = 1_000_000;

+ 2 - 1
src/time/src/lib.rs

@@ -105,7 +105,8 @@ pub extern "C" fn clock() -> clock_t {
     }
     }
 
 
     if ts.tv_sec > time_t::max_value() / CLOCKS_PER_SEC
     if ts.tv_sec > time_t::max_value() / CLOCKS_PER_SEC
-        || ts.tv_nsec / (1_000_000_000 / CLOCKS_PER_SEC) > time_t::max_value() - CLOCKS_PER_SEC * ts.tv_sec
+        || ts.tv_nsec / (1_000_000_000 / CLOCKS_PER_SEC)
+            > time_t::max_value() - CLOCKS_PER_SEC * ts.tv_sec
     {
     {
         return -1;
         return -1;
     }
     }