Skip to content

Commit

Permalink
Remove unnecessary s
Browse files Browse the repository at this point in the history
  • Loading branch information
Cassy343 committed Jul 27, 2022
1 parent d58fbf0 commit fdd68d6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ impl<T> Sender<T> {
// The receiver is alive and has not started waiting. Send done.
EMPTY => Ok(()),
// The receiver is waiting. Wake it up so it can return the message.
#[allow(unreachable_code)]
RECEIVING => {
// ORDERING: Synchronizes with the write of the waker to memory, and prevents the
// taking of the waker from being ordered before this operation.
Expand All @@ -313,7 +312,6 @@ impl<T> Sender<T> {
// SAFETY: at this point we are in the UNPARKING state, and the receiving thread
// does not access the waker while in this state, nor does it free the channel
// allocation in this state.
#[allow(unused_variables)]
let waker = unsafe { channel.take_waker() };

// ORDERING: this ordering serves two-fold: it synchronizes with the acquire load
Expand Down Expand Up @@ -367,13 +365,11 @@ impl<T> Drop for Sender<T> {
// The receiver has not started waiting, nor is it dropped.
EMPTY => (),
// The receiver is waiting. Wake it up so it can detect that the channel disconnected.
#[allow(unreachable_code)]
RECEIVING => {
// See comments in Sender::send

fence(Acquire);

#[allow(unused_variables)]
let waker = unsafe { channel.take_waker() };

// We still need release ordering here to make sure our read of the waker happens
Expand Down

0 comments on commit fdd68d6

Please sign in to comment.