fn try_take_value_from_sender(&mut self) -> Option<(T, Option<Waker>)> {
        // Safety: The method is only called inside the lock on a consistent
        // list.
        match self.send_waiters.remove_last() {
            Some(last_sender) => {
                // This path should be only used for 0 capacity queues.
                // Since the list is not empty, a value is available.
                // Extract it from the sender in order to return it
                debug_assert_eq!(0, self.buffer.capacity());

                // Safety: The sender can't be invalid, since we only add valid
                // senders to the queue
                let val =
                    last_sender.value.take().expect("Value must be available");
                last_sender.state = SendPollState::SendComplete;

                // Return the waiter
                Some((val, last_sender.task.take()))
            }
            None => None,
        }
    }
/// Tries to extract a value from the sending waiter which has been waiting
/// longest on the send operation to complete.
Tries to extract a value from the sending waiter which has been waiting
longest on the send operation to complete.
Tries to extract a value from the sending waiter which has been waiting longest on the send operation to complete .
fn try_take_value_from_sender(&mut self) -> Option<(T, Option<Waker>)> {
        // Safety: The method is only called inside the lock on a consistent
        // list.
        match self.send_waiters.remove_last() {
            Some(last_sender) => {
                // This path should be only used for 0 capacity queues.
                // Since the list is not empty, a value is available.
                // Extract it from the sender in order to return it
                debug_assert_eq!(0, self.buffer.capacity());
                // Safety: The sender can't be invalid, since we only add valid
                // senders to the queue
                let val =
                    last_sender.value.take().expect("Value must be available");
                last_sender.state = SendPollState::SendComplete;
                // Return the waiter
                Some((val, last_sender.task.take()))
            }
            None => None,
        }
    }
fn try_take_value_from_sender ( & mut self ) -> Option < ( T , Option < Waker > ) > { // Safety: The method is only called inside the lock on a consistent // list. match self . send_waiters . remove_last ( ) { Some ( last_sender ) => { // This path should be only used for 0 capacity queues. // Since the list is not empty, a value is available. // Extract it from the sender in order to return it debug_assert_eq ! ( 0 self buffer capacity ( ) ) ; // Safety: The sender can't be invalid, since we only add valid // senders to the queue let val = last_sender . value . take ( ) . expect ( " " ) ; last_sender . state = SendPollState :: SendComplete ; // Return the waiter Some ( ( val , last_sender . task . take ( ) ) ) } None => None , } }
Tries to extract a value from the sending waiter which has been waiting
longest on the send operation to complete.
Tries to extract a value from the sending waiter which has been waiting longest on the send operation to complete .
&mut self
&mut self