-
-
Notifications
You must be signed in to change notification settings - Fork 103
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 some clippy warnings #680
Conversation
989bb3f
to
c65e5c2
Compare
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.
Thanks :)
src/analysis/function_parameters.rs
Outdated
@@ -141,7 +141,7 @@ impl Parameters { | |||
} | |||
} | |||
|
|||
#[cfg_attr(feature = "cargo-clippy", allow(useless_let_if_seq))] | |||
#[cfg_attr(feature = "cargo-clippy", allow(clippy::useless_let_if_seq))] |
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.
You don't need the feature anymore
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.
You right, it already on stable too.
src/analysis/signatures.rs
Outdated
@@ -65,12 +65,12 @@ impl Signature { | |||
(false, None) | |||
} | |||
|
|||
pub fn eq(&self, other: &Signature) -> bool { | |||
pub fn equals(&self, other: &Signature) -> bool { |
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.
Or implement Eq here?
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.
I prefer to leave it this way, since we also have property_eq
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.
Hm, if I remove unneeded pub
clippy don't nags about old name
src/codegen/sys/statics.rs
Outdated
@@ -6,7 +6,7 @@ pub fn begin(w: &mut Write) -> Result<()> { | |||
let v = vec![ | |||
"", | |||
"#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]", | |||
"#![cfg_attr(feature = \"cargo-clippy\", allow(approx_constant, type_complexity, unreadable_literal))]", | |||
"#![cfg_attr(feature = \"cargo-clippy\", allow(clippy::approx_constant, clippy::type_complexity, clippy::unreadable_literal))]", |
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 will be with feature check until we don't go up from rust 1.28.0
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.
We have to switch to 1.31 anyway already, @GuillaumeGomez has that on his list already. Major parts of the ecosystem already don't compile with pre-1.31 anymore, including things like cc
.
For GStreamer I already switched to 1.31 because of that.
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.
Thanks for info, then I remove feature here too.
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.
ok :) Doesn't make me happy but what can we do
also add clippy check in travis