diff --git a/Cargo.toml b/Cargo.toml index 3465147..937ae57 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "elsa" -version = "1.11.0" +version = "1.11.1" authors = ["Manish Goregaokar "] edition = "2018" description = "Append-only collections for Rust where borrows to entries can outlive insertions" diff --git a/src/sync.rs b/src/sync.rs index 2cdd367..bc8a9df 100644 --- a/src/sync.rs +++ b/src/sync.rs @@ -712,8 +712,10 @@ impl Default for LockFreeFrozenVec { } impl LockFreeFrozenVec { + const NULL_ATOMIC_PTR: AtomicPtr = AtomicPtr::new(std::ptr::null_mut()); + const fn null() -> [AtomicPtr; NUM_BUFFERS] { - [const { AtomicPtr::new(std::ptr::null_mut()) }; NUM_BUFFERS] + [Self::NULL_ATOMIC_PTR; NUM_BUFFERS] } pub const fn new() -> Self {