Skip to content

Commit

Permalink
Merge pull request #84 from Nekomaru-PKU/master
Browse files Browse the repository at this point in the history
Fix #83: Remove Usage of `inline-const` Feature
  • Loading branch information
Manishearth authored Feb 5, 2025
2 parents 96210cd + 6409658 commit 875e705
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "elsa"
version = "1.11.0"
version = "1.11.1"
authors = ["Manish Goregaokar <[email protected]>"]
edition = "2018"
description = "Append-only collections for Rust where borrows to entries can outlive insertions"
Expand Down
4 changes: 3 additions & 1 deletion src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,10 @@ impl<T: Copy> Default for LockFreeFrozenVec<T> {
}

impl<T: Copy> LockFreeFrozenVec<T> {
const NULL_ATOMIC_PTR: AtomicPtr<T> = AtomicPtr::new(std::ptr::null_mut());

const fn null() -> [AtomicPtr<T>; NUM_BUFFERS] {
[const { AtomicPtr::new(std::ptr::null_mut()) }; NUM_BUFFERS]
[Self::NULL_ATOMIC_PTR; NUM_BUFFERS]
}

pub const fn new() -> Self {
Expand Down

0 comments on commit 875e705

Please sign in to comment.