-
Notifications
You must be signed in to change notification settings - Fork 29
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
Fix (clippy) warnings in Rust generated code #230
base: master
Are you sure you want to change the base?
Conversation
Also fix (clippy) warnings in Rust tests Tested against rustc version 1.63.0. After this is merged and the new generator is released, additional flag `--all-targets` can be added to `cargo test` in CI. Signed-off-by: boxdot <[email protected]>
5bd3abc
to
0bef56e
Compare
@@ -109,15 +109,13 @@ impl ::std::fmt::Debug for {{archive.name}} { | |||
} | |||
|
|||
impl {{archive.name}} { | |||
#[allow(unused_imports, unused_variables)] |
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.
This is a bit less granular, though, isn't it?
What's the problem with annotating exactly the imports/variable that might be unused?
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.
It did not work in the first place:
683 | #[allow(unused_variables)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if you just forgot a `!`, use: `#![allow(unused_var
There is no way to annotated a single import as maybe being unused.
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.
But annotating a single variable is possible, should we do that?
Signed-off-by: boxdot <[email protected]>
214091a
to
c15ecf2
Compare
@boxdot btw, what's up with this one? |
Technically, I am still waiting on you review. The only one comment left, where we need to decide how to go forward. |
Also fix (clippy) warnings in Rust tests
Tested against rustc version 1.63.0. After this is merged and the new
generator is released, additional flag
--all-targets
can be added tocargo test
in CI.