Skip to content

Commit e9a37a7

Browse files
committed
Added rust-version to Cargo.toml
1 parent 1e19189 commit e9a37a7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ edition = "2021"
66
description = "A fast thread-safe single producer-single consumer ring buffer"
77
repository = "https://github.com/Mallets/ringbuffer-spsc"
88
license = "EPL-2.0 OR Apache-2.0"
9+
rust-version = "1.79"
910

1011
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1112

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ pub fn ringbuffer<T>(capacity: usize) -> (RingBufferWriter<T>, RingBufferReader<
5656
.into_boxed_slice();
5757

5858
let rb = Arc::new(RingBuffer {
59-
// Keep
59+
// Keep the pointer to the boxed slice
6060
ptr: Box::into_raw(v),
6161
// Since capacity is a power of two, capacity-1 is a mask covering N elements overflowing when N elements have been added.
62-
// Indexes are left growing indefinetely and naturally wraps around once the index increment reaches usize::MAX.
62+
// Indexes are left growing indefinetely and naturally wrap around once the index increment reaches usize::MAX.
6363
mask: capacity - 1,
6464
idx_r: CachePadded::new(AtomicUsize::new(0)),
6565
idx_w: CachePadded::new(AtomicUsize::new(0)),

0 commit comments

Comments
 (0)