Skip to content

Commit

Permalink
deprecate push
Browse files Browse the repository at this point in the history
  • Loading branch information
NULLx76 committed May 15, 2024
1 parent ce4b26e commit 1a63e1b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ringbuffer_trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,12 @@ pub unsafe trait RingBuffer<T>:
#[doc(hidden)]
unsafe fn ptr_buffer_size(rb: *const Self) -> usize;

/// Alias for [`enqueue`](RingBuffer::enqueue)

/// Alias for [`enqueue`]
#[deprecated = "use enqueue instead"]
#[inline]
fn push(&mut self, value: T) {
self.enqueue(value);
self.enqueue(value)
}

/// Adds a value onto the buffer.
Expand Down

0 comments on commit 1a63e1b

Please sign in to comment.