aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index edf5697..b4c1698 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -60,7 +60,7 @@ impl<T> RingBuffer<T> {
//
// No, lazy_static is not an option, because it doesn't work on
// architectures where CAS atomics are missing.
- pub const fn split<'a>(&'a self) -> (Reader<T>, Writer<T>) {
+ pub const fn split(&self) -> (Reader<T>, Writer<T>) {
let rbr = Reader { rb: &self };
let rbw = Writer { rb: &self };
(rbr, rbw)
@@ -92,8 +92,7 @@ impl<T> Reader<'_, T> {
let t = self.rb.tail.load(Ordering::Relaxed);
atomic::fence(Ordering::Acquire);
- let rc = (t + CAPACITY - h) % CAPACITY;
- rc
+ (t + CAPACITY - h) % CAPACITY
}
/// Whether or not the ring buffer is empty.