-
Notifications
You must be signed in to change notification settings - Fork 112
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
CI: fix clippy issues #1013
CI: fix clippy issues #1013
Conversation
|
It looks like GH actions used the old version of clippy: That's weird, because the runners used for CI in |
Afaik rustup is present in runner images. Maybe we should explicitly install latest stable using rustup and set it as default in CI instead of relying on what is the current default on the runners. |
d5bd36d
to
e8b43c7
Compare
v2: Added a step which updates rust toolchain in CI. |
@wprzytula @Lorak-mmk Do you think that we should do the same for other workflows that use rust toolchain? As of now, we only update it for |
I can see two approaches.
|
I agree, let's use latest stable everywhere, and msrv in msrv pipeline |
We decided to unify CI, and make use of latest stable version of rust toolchain for each of the workflows that actually uses it. The only exception is `Rust / min_rust` job, which uses MSRV.
Clippy complains about the code generated by `darling` crate. This commit silences clippy by allowing to perform manual unwrap_or_default.
Clippy complains about using `std::i16::MAX`, instead of `i16::MAX`. This commit fixes the issue.
e8b43c7
to
c531974
Compare
v2: using latest stable version of rust toolchain in CI (min_rust is exception - using MSRV) |
@Lorak-mmk Please re-review and merge. |
CI: fix clippy issues (cherry picked from commit c8db77b)
CI: fix clippy issues (cherry picked from commit c8db77b)
There were two clippy checks that were failing:
unwrap_or_default
in the code generated bydarling
crate. See the corresponding issue:clippy
warns about use ofif let
in generated code TedDriggs/darling#293std::i16::MAX
, instead ofi16::MAX
This PR fixes the issues and makes CI pass.
Pre-review checklist
[ ] I added relevant tests for new features and bug fixes.[ ] I have provided docstrings for the public items that I want to introduce.[ ] I have adjusted the documentation in./docs/source/
.[ ] I added appropriateFixes:
annotations to PR description.