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
Do clippy improvements #1367
Do clippy improvements #1367
Conversation
Clippy emits a bunch of warnings of form: warning: casting to the same type is unnecessary ... As suggested, remove the unnecessary casts.
Clippy emits: warning: deref which would be done by auto-deref As suggested, remove the unnecessary deref (`*`).
Clippy emits: warning: binary comparison to literal `Option::None` As suggested, use `find.is_none()` instead of comparison with `None`.
Clippy emits: warning: the borrowed expression implements the required traits As suggested, remove the unnecessary explicit borrow.
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.
ACK 1050fe9
Nice cleanups!
@@ -284,7 +284,7 @@ impl Decodable for BlockTransactionsRequest { | |||
// Since the number of indices ultimately represent transactions, | |||
// we can limit the number of indices to the maximum number of | |||
// transactions that would be allowed in a vector. | |||
let byte_size = (nb_indexes as usize) | |||
let byte_size = (nb_indexes) |
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, it didn't complain about useless parentheses?
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 this later. Merging this PR now to get the CI rolling
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.
bah, I must be blind. Will fix, thanks.
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.
ACK 1050fe9.
Clippy has been updated and new warnings are being triggered in our codebase. This PR does all warnings using nightly since they all looked like reasonable things to fix.
Needed for CI to pass in other open PRs.