Skip to content

Commit

Permalink
remove unnecessary poll_unpin invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
mindeng committed Aug 22, 2024
1 parent 240ebf7 commit 7ee2955
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/token_bucket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::{
time::{Duration, Instant},
};

use futures::{Future, FutureExt};
use futures::Future;

use crate::rt::delay;

Expand Down Expand Up @@ -246,7 +246,7 @@ impl Future for Token<'_> {
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Self::Output> {
let this = unsafe { self.get_unchecked_mut() };
match this.fut.poll_unpin(cx) {
match this.fut.as_mut().poll(cx) {
std::task::Poll::Ready(_) => {
this.consumed = true;
Poll::Ready(())
Expand Down

0 comments on commit 7ee2955

Please sign in to comment.