Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #83: Remove Usage of inline-const Feature #84

Merged
merged 1 commit into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix #83 elsa 1.11.0 fails to compile in older Rust toolchain due to u…
…sage of the inline-const feature
  • Loading branch information
Nekomaru-PKU committed Feb 5, 2025
commit 6409658967a3ea22544acaed9315057694f80267
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