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 { 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,