fn return_last_waiter(&mut self) -> Option<Waker> {
        let last_waiter = if self.is_fair {
            self.waiters.peek_last()
        } else {
            self.waiters.remove_last()
        };

        if let Some(last_waiter) = last_waiter {
            // Notify the waiter that it can try to lock the mutex again.
            // The notification gets tracked inside the waiter.
            // If the waiter aborts it's wait (drops the future), another task
            // must be woken.
            last_waiter.state = PollState::Notified;

            let task = &mut last_waiter.task;
            return task.take();
        }

        None
    }
/// Returns the `Waker` associated with the up the last waiter
///
/// If the Mutex is not fair, removes the associated wait node also from
/// the wait queue
Returns the `Waker` associated with the up the last waiter
If the Mutex is not fair, removes the associated wait node also from
the wait queue
Returns the ` Waker ` associated with the up the last waiter If the Mutex is not fair removes the associated wait node also from the wait queue
fn return_last_waiter(&mut self) -> Option<Waker> {
        let last_waiter = if self.is_fair {
            self.waiters.peek_last()
        } else {
            self.waiters.remove_last()
        };
        if let Some(last_waiter) = last_waiter {
            // Notify the waiter that it can try to lock the mutex again.
            // The notification gets tracked inside the waiter.
            // If the waiter aborts it's wait (drops the future), another task
            // must be woken.
            last_waiter.state = PollState::Notified;
            let task = &mut last_waiter.task;
            return task.take();
        }
        None
    }
fn return_last_waiter ( & mut self ) -> Option < Waker > { let last_waiter = if self . is_fair { self . waiters . peek_last ( ) } else { self . waiters . remove_last ( ) } ; if let Some ( last_waiter ) = last_waiter { // Notify the waiter that it can try to lock the mutex again. // The notification gets tracked inside the waiter. // If the waiter aborts it's wait (drops the future), another task // must be woken. last_waiter . state = PollState :: Notified ; let task = & mut last_waiter . task ; return task . take ( ) ; } None }
Returns the `Waker` associated with the up the last waiter
If the Mutex is not fair, removes the associated wait node also from
the wait queue
Returns the ` Waker ` associated with the up the last waiter If the Mutex is not fair removes the associated wait node also from the wait queue
&mut self
&mut self