Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable arithmetic lint in rate-limiter #7025

Open
wants to merge 4 commits into
base: unstable
Choose a base branch
from

Conversation

ackintosh
Copy link
Member

@ackintosh ackintosh commented Feb 21, 2025

Issue Addressed

#6875

Proposed Changes

  • Enabled the linter in rate-limiter and fixed errors.
  • Changed the type of Quota::max_tokens from u64 to NonZeroU64 because max_tokens cannot be zero.
  • Added a test to ensure that a large value for tokens, which causes an overflow, is handled properly.

@ackintosh ackintosh added the work-in-progress PR is a work-in-progress label Feb 21, 2025
@ackintosh ackintosh marked this pull request as ready for review February 24, 2025 23:00
@ackintosh ackintosh requested a review from jxs as a code owner February 24, 2025 23:00
@ackintosh ackintosh added ready-for-review The code is ready for review Networking and removed work-in-progress PR is a work-in-progress labels Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Networking ready-for-review The code is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant