From 52e029809c9e185ffa9753dcb5a862d769f814af Mon Sep 17 00:00:00 2001 From: Jonathan Strong Date: Thu, 31 Aug 2023 14:52:58 -0400 Subject: [PATCH] remove unnecessary cast --- Cargo.lock | 2 +- src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 178bc41..08bb0ea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -441,7 +441,7 @@ checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] name = "utcnow" -version = "1.5.0" +version = "1.5.1" dependencies = [ "chrono", "chrono-tz", diff --git a/src/main.rs b/src/main.rs index 197cfcb..19bfb23 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,7 @@ fn nanos(utc: DateTime) -> u64 { fn get_time() -> (i64, i32) { let mut tv = libc::timespec { tv_sec: 0, tv_nsec: 0 }; unsafe { libc::clock_gettime(libc::CLOCK_REALTIME, &mut tv); } - (tv.tv_sec as i64, tv.tv_nsec as i32) + (tv.tv_sec, tv.tv_nsec as i32) } fn timespec_to_utc(sec: i64, nsec: i32) -> DateTime {