-
Notifications
You must be signed in to change notification settings - Fork 149
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
rust: Deal with new Rust 1.66 warnings #977
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Not only install the toolchain specified by the matrix, but also make it the default one, since the build system uses the default toolchain. Currently, our "1.51" build actually uses "stable" because of this. :facepalm:
Guess what? CI was lying. RustThemis does not compile with 1.51 because we use Rust 2021 edition which was not stabilized until 1.56. Bump it.
New stable Clippy points out the following: error: casting to the same type is unnecessary (`usize` -> `usize`) --> src/wrappers/themis/rust/src/keygen.rs:108:29 | 108 | private_key.set_len(private_key_len as usize); | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `private_key_len` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `-D clippy::unnecessary-cast` implied by `-D warnings`
Previously this was suppressed in the main Themis code, but seems like the new Clippy learned about the existence of benchmarks. Suppress this warning there as well.
vixentael
approved these changes
Jan 15, 2023
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.
thank you! this should unblock other PRs
radetsky
pushed a commit
that referenced
this pull request
Jan 25, 2023
* CI: Correct Rust toolchain installation Not only install the toolchain specified by the matrix, but also make it the default one, since the build system uses the default toolchain. Currently, our "1.51" build actually uses "stable" because of this. :facepalm: * rust: Minimum supported version is now 1.56 Guess what? CI was lying. RustThemis does not compile with 1.51 because we use Rust 2021 edition which was not stabilized until 1.56. Bump it. * rust: Drop unnecessary casts New stable Clippy points out the following: error: casting to the same type is unnecessary (`usize` -> `usize`) --> src/wrappers/themis/rust/src/keygen.rs:108:29 | 108 | private_key.set_len(private_key_len as usize); | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `private_key_len` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `-D clippy::unnecessary-cast` implied by `-D warnings` * rust: Suppress more warnings Previously this was suppressed in the main Themis code, but seems like the new Clippy learned about the existence of benchmarks. Suppress this warning there as well.
ilammy
added a commit
to ilammy/themis
that referenced
this pull request
Feb 5, 2023
This reverts commit 890536c. Well, most of it, keeping only the changes in CI, but rolling back source code to the state it was in 0.14.0.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I noticed that both "stable" and "1.51" builds are failing with new warnings from Clippy 1.66. That's weird. Turns out the "1.51" build was actually testing the latest stable Rust. Way to go. And RustThemis actually does not work with 1.51, the minimum version that works is 1.56.
After that is dealt with, clean up some things that Clippy 1.66 complains about. Suppress some others (#971).
Checklist