Skip to content

Commit

Permalink
remove mask and without alloc
Browse files Browse the repository at this point in the history
  • Loading branch information
jdonszelmann committed Sep 15, 2023
1 parent 1495ba5 commit 610ed9f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pub use with_const_generics::ConstGenericRingBuffer;

/// Used internally. Computes the bitmask used to properly wrap the ringbuffers.
#[inline]
#[cfg(feature="alloc")]
const fn mask_and(cap: usize, index: usize) -> usize {
debug_assert!(cap.is_power_of_two());
index & (cap - 1)
Expand Down

1 comment on commit 610ed9f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.