Skip to content

Commit 4ecde29

Browse files
committed
chore: fix spurious clippy warning
warning: a `const` item should not be interior mutable --> src/unbounded.rs:44:5 | 44 | / const UNINIT: Slot<T> = Slot { 45 | | value: UnsafeCell::new(MaybeUninit::uninit()), 46 | | state: AtomicUsize::new(0), 47 | | }; | |______^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const = note: `#[warn(clippy::declare_interior_mutable_const)]` on by default
1 parent 9c906a2 commit 4ecde29

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/unbounded.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ struct Slot<T> {
4141

4242
impl<T> Slot<T> {
4343
#[cfg(not(loom))]
44+
#[allow(clippy::declare_interior_mutable_const)]
4445
const UNINIT: Slot<T> = Slot {
4546
value: UnsafeCell::new(MaybeUninit::uninit()),
4647
state: AtomicUsize::new(0),

0 commit comments

Comments
 (0)