Skip to content

Commit

Permalink
Merge pull request #61 from qdrant/allow-arc-unsafe-cell-warning
Browse files Browse the repository at this point in the history
Allow clippy warning for UnsafeCell in Arc
  • Loading branch information
timvisee authored Sep 26, 2023
2 parents 3a59461 + 0c2d050 commit bc30bdb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 3 additions & 1 deletion examples/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions src/mmap_view_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ impl From<MmapMut> 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,
Expand Down

0 comments on commit bc30bdb

Please sign in to comment.