-
-
Notifications
You must be signed in to change notification settings - Fork 771
Clippy: Enable many style lints #3643
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
Conversation
Self { | ||
0: [0; SECTOR_SIZE as usize], | ||
} | ||
Self([0; SECTOR_SIZE as usize]) |
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.
Wow, this old syntax is positively terrifying. Who knew that you could do 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.
These all broadly make sense to me.
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.
Two screaming into the void comments, three real ones
@@ -49,7 +49,7 @@ impl AddrRange { | |||
let full_bytes: usize = prefix_len / 8; | |||
let remainder_bits: usize = prefix_len % 8; | |||
// initial bytes -- TODO: edge case | |||
if &allowed_addr.0[0..full_bytes] != &addr.0[0..full_bytes] { | |||
if allowed_addr.0[0..full_bytes] != addr.0[0..full_bytes] { |
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.
The fact that these two expressions are equivalent... this is why borrows are so hard to teach :/
6c36b07
to
eb5d24c
Compare
eb5d24c
to
9469f30
Compare
9469f30
to
53983b5
Compare
Pull Request Overview
This pull request enables many of the clippy style lints that to me seem noncontroversial.
You can see the change made by each one in each commit. If one seems like it needs more discussion I'm happy to move it to a new PR.
I also fixed a mistake from an earlier clippy PR where we both denied and allowed a flag (before I decided to enumerate all allows).
Testing Strategy
travis
TODO or Help Wanted
n/a
Documentation Updated
/docs
, or no updates are required.Formatting
make prepush
.