-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
It looks like @c410-f3r signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
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 should remove the manual implementation of Hash
instead of manually implementing PartialEq
.
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.
Nice to catch these mistakes/bad-practices with clippy or any other tool but since we don't use it in a structured way, I don't think we want to have clippy attributes anywhere in the code.
Though I might be wrong here.
To remove all hard errors, more research is needed, specially inside the |
@@ -178,7 +178,7 @@ macro_rules! implement_per_thing { | |||
// `rem_multiplied_upper` is less than $max^2 therefore divided by $max it fits | |||
// in $type. remember that $type always fits $max. | |||
let mut rem_multiplied_divided_sized = | |||
(rem_multiplied_upper / upper_max) as $type; | |||
rem_multiplied_upper.div(upper_max) as $type; |
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.
Hmm, how is that better?
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 is just to avoid https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_arithmetic_impl. Probably a false-positive
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.
Could you please revert this? We should not include fixes for false positives in clippy.
@@ -178,7 +178,7 @@ macro_rules! implement_per_thing { | |||
// `rem_multiplied_upper` is less than $max^2 therefore divided by $max it fits | |||
// in $type. remember that $type always fits $max. | |||
let mut rem_multiplied_divided_sized = | |||
(rem_multiplied_upper / upper_max) as $type; | |||
rem_multiplied_upper.div(upper_max) as $type; |
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.
Could you please revert this? We should not include fixes for false positives in clippy.
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.
overall changes lgtm except for the two mentioned that you should revert.
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.
Ty
@c410-f3r you need to merge master. |
Fix some Clippy issues
@bkchr Merged |
Ty |
Thanks |
Compliance with all default hard errors and crates that are explicitly
using
#![deny(warnings)]
.There are some legitimate warnings like
println!("")
->println!()
butthey aren't considered in this PR.