Skip to content

Conversation

@AEnterprise
Copy link
Member

No description provided.

@github-actions github-actions bot added c-gateway Affects the gateway crate c-http-ratelimiting Affects the http ratelimiting crate t-fix Fixes a bug in the library labels Dec 12, 2025
Copy link
Member

@vilgotf vilgotf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh can't we just #[allow] this lint? This looks like a hack (the lint should detect the sub method)

@AEnterprise
Copy link
Member Author

i figured the function would panic if it overflows? if not its better to use expect then probably in those specific tests. wouldn't allow the entire lint as there are plenty of places where you'd want it to warn you about this

@vilgotf
Copy link
Member

vilgotf commented Dec 13, 2025

Panic on underflows / expect checked sub are equivalent. I only #[allowed] the lint in tests

@vilgotf vilgotf merged commit b3d4764 into main Dec 13, 2025
9 checks passed
@vilgotf vilgotf deleted the AE/fix/clippy branch December 13, 2025 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c-gateway Affects the gateway crate c-http-ratelimiting Affects the http ratelimiting crate t-fix Fixes a bug in the library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants