From 1a63e1be0455301664f28a36f576860e95f9f180 Mon Sep 17 00:00:00 2001 From: Vivian Date: Wed, 15 May 2024 19:42:19 +0200 Subject: [PATCH] deprecate push --- src/ringbuffer_trait.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ringbuffer_trait.rs b/src/ringbuffer_trait.rs index 3f4beca..8e86c66 100644 --- a/src/ringbuffer_trait.rs +++ b/src/ringbuffer_trait.rs @@ -75,9 +75,12 @@ pub unsafe trait RingBuffer: #[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.