Skip to content

Commit

Permalink
refactor(middleware): cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
willser committed Oct 27, 2023
1 parent cc5e945 commit 6a3a1c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions middleware/middleware-rate-limit/src/rate_limit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ impl TokenBucket {

self.tokens = min(self.tokens + tokens_to_add, self.capacity);

return if self.tokens > 0 {
if self.tokens > 0 {
self.last_query_time = current_time;
self.tokens = self.tokens - 1;
self.tokens -= 1;
true
} else {
false
};
}
}
}

0 comments on commit 6a3a1c3

Please sign in to comment.