-
Notifications
You must be signed in to change notification settings - Fork 213
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
Deny clippy warnings in CI properly #2109
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
let sequence: u64 = sequence | ||
.try_into() | ||
.map_err(|_| RestError::InvalidSequenceNumber)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure the intention here was not to check if try_into()
has some errors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sequence
is already a u64
so try_into()
never fails.
@@ -1,3 +1,5 @@ | |||
#![allow(clippy::vec_init_then_push)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couldn't we move this in? (i mean just fix it perhaps)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The module contains auto generated code so I feel like it's more convenient to keep this outside so it's easier to update the code if needed.
Pre-commit config in CI previously used
clippy --fix
, which makes-D warnings
have no effect. Now warnings should be properly denied. I fixed the simple warnings and added allow annonations for more complex cases.