Skip to content

Commit

Permalink
Clippy warning fix for async fn/trait
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendan-Blanchard committed Mar 8, 2024
1 parent 5263ce9 commit 56d52d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/limiters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
///
/// [`SlidingWindowRateLimiter`]: ../sliding_window/struct.SlidingWindowRateLimiter.html
pub trait RateLimiter {
async fn wait_until_ready(&mut self);
fn wait_until_ready(&mut self) -> impl std::future::Future<Output = ()> + Send;
}

/// A cost-based rate limiter, where each call can be of a variable cost.
Expand All @@ -15,5 +15,5 @@ pub trait RateLimiter {
///
/// [`TokenBucketRateLimiter`]: ../token_bucket/struct.TokenBucketRateLimiter.html
pub trait VariableCostRateLimiter {
async fn wait_with_cost(&mut self, cost: usize);
fn wait_with_cost(&mut self, cost: usize) -> impl std::future::Future<Output = ()> + Send;
}

0 comments on commit 56d52d1

Please sign in to comment.