Skip to content

Commit

Permalink
Fix #83 elsa 1.11.0 fails to compile in older Rust toolchain due to u…
Browse files Browse the repository at this point in the history
…sage of the inline-const feature
  • Loading branch information
Nekomaru-PKU committed Feb 5, 2025
1 parent 96210cd commit 6409658
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 <manishsmail@gmail.com>"]
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 6409658

Please sign in to comment.