Skip to content

Commit

Permalink
Remove explicit #[inline] annotations on destructor
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed Mar 6, 2022
1 parent 4b27731 commit 61fc475
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ impl<T> RingBuffer<T> {
}
}

#[inline]
unsafe fn abandon<T>(buffer: NonNull<RingBuffer<T>>) {
// The two threads (producer and consumer) must observe the same order of accesses
// to `is_abandoned`. This is accomplished with Acquire/Release.
Expand Down Expand Up @@ -359,7 +358,6 @@ pub struct Producer<T> {
unsafe impl<T: Send> Send for Producer<T> {}

impl<T> Drop for Producer<T> {
#[inline]
fn drop(&mut self) {
// Safety: The pointer is valid until after the second call to `abandon()`.
unsafe { abandon(self.buffer) };
Expand Down Expand Up @@ -579,7 +577,6 @@ pub struct Consumer<T> {
unsafe impl<T: Send> Send for Consumer<T> {}

impl<T> Drop for Consumer<T> {
#[inline]
fn drop(&mut self) {
// Safety: The pointer is valid until after the second call to `abandon()`.
unsafe { abandon(self.buffer) };
Expand Down

0 comments on commit 61fc475

Please sign in to comment.