From 62ecb19cb32326d2c10b675f21f60d0464299803 Mon Sep 17 00:00:00 2001 From: timvisee Date: Mon, 25 Sep 2023 16:41:12 +0200 Subject: [PATCH 1/2] Allow clippy warning for UnsafeCell in Arc --- src/mmap_view_sync.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mmap_view_sync.rs b/src/mmap_view_sync.rs index 60982d9..26cc9a5 100644 --- a/src/mmap_view_sync.rs +++ b/src/mmap_view_sync.rs @@ -147,6 +147,7 @@ impl From for MmapViewSync { fn from(mmap: MmapMut) -> MmapViewSync { let len = mmap.len(); MmapViewSync { + #[allow(clippy::arc_with_non_send_sync)] inner: Arc::new(UnsafeCell::new(mmap)), offset: 0, len, From 0c2d050cc663c768e9b79256cf3e36983436a0a5 Mon Sep 17 00:00:00 2001 From: timvisee Date: Mon, 25 Sep 2023 16:52:36 +0200 Subject: [PATCH 2/2] Fix use of deprecated function in chrono --- Cargo.toml | 2 +- examples/bench.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 95862ed..1d2717e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,4 +35,4 @@ hdrhistogram = "7.5.2" quickcheck = "1.0.3" regex = "1.8.1" tempfile = "3.5.0" -chrono = "0.4.24" +chrono = "0.4.31" diff --git a/examples/bench.rs b/examples/bench.rs index c415d0a..7383b15 100644 --- a/examples/bench.rs +++ b/examples/bench.rs @@ -42,7 +42,9 @@ fn main() { } pub fn precise_time_ns() -> u64 { - chrono::offset::Utc::now().timestamp_nanos() as u64 + chrono::offset::Utc::now() + .timestamp_nanos_opt() + .expect("timestamp after year 2262") as u64 } fn format_duration(n: u64) -> String {