-
Notifications
You must be signed in to change notification settings - Fork 747
clippy: Document or fix all style lints #4477
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
This was hiding a copy-paste mistake in analog_sensor.rs
Don't create an additional closure when we are just passing a function to map().
Use `if let` consistently.
This helps avoid an extra `mut`.
I recently tried disallowing |
sensor_type: AnalogLightSensorType, | ||
) -> AnalogLightSensor<'a, A> { | ||
AnalogLightSensor { | ||
sensor_type: AnalogTemperatureSensorType, | ||
) -> Self { | ||
Self { |
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 seems like it fixes a bug(?) where sensor_type
had an incorrect type? Should probably be its own PR.
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.
Actually even worse, we're constructing a completely wrong type here. Should definitely be its own PR.
That is a pedantic lint, not style |
Pull Request Overview
I documented all of the clippy lints I think we want to continue allowing with why we allow them.
Many others I removed and fixed the changes.
There are three left over:
declare-interior-mutable-const
: fixed in clippy: deny declare-interior-mutable-const #4476missing_safety_doc
: needs to be fixed, but is a much bigger jobdoc_lazy_continuation
: should be fixed, but will be a big diff and more workTesting Strategy
n/a
TODO or Help Wanted
n/a
Documentation Updated
/docs
, or no updates are required.Formatting
make prepush
.