Skip to content

Commit

Permalink
Removed 'as_mut' since its unnecessary
Browse files Browse the repository at this point in the history
  • Loading branch information
tglane committed Jun 10, 2024
1 parent e1340e2 commit 1845a70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tokio-util/src/sync/cancellation_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,10 @@ impl CancellationToken {
type Output = Option<F::Output>;

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
let mut this = self.project();
if let Poll::Ready(res) = this.future.as_mut().poll(cx) {
let this = self.project();
if let Poll::Ready(res) = this.future.poll(cx) {
Poll::Ready(Some(res))
} else if this.cancellation.as_mut().poll(cx).is_ready() {
} else if this.cancellation.poll(cx).is_ready() {
Poll::Ready(None)
} else {
Poll::Pending
Expand Down

0 comments on commit 1845a70

Please sign in to comment.