Skip to content

Commit 6a1be43

Browse files
committed
address clippy complaint
1 parent 719d513 commit 6a1be43

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ddcommon/src/rate_limiter.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ fn now() -> u64 {
5454
tv_nsec: 0,
5555
};
5656
unsafe { libc::clock_gettime(libc::CLOCK_MONOTONIC, &mut ts) };
57-
(ts.tv_sec as i64 * TIME_PER_SECOND + ts.tv_nsec as i64) as u64
57+
#[cfg(target_pointer_width = "64")]
58+
let result = (ts.tv_sec * TIME_PER_SECOND + ts.tv_nsec) as u64;
59+
#[cfg(target_pointer_width = "32")]
60+
let result = (ts.tv_sec as i64 * TIME_PER_SECOND + ts.tv_nsec as i64) as u64;
61+
result
5862
};
5963
now
6064
}

0 commit comments

Comments
 (0)