8000 clippy: Document or fix all style lints by bradjc · Pull Request #4477 · tock/tock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 10 commits into from
Jun 23, 2025
Merged

Conversation

bradjc
Copy link
Contributor
@bradjc bradjc commented Jun 21, 2025

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:

Testing Strategy

n/a

TODO or Help Wanted

n/a

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

@github-actions github-actions bot added kernel sam4l Change pertains to the SAM4L MCU. tock-libraries This affects libraries supported by the Tock project WG-OpenTitan In the purview of the OpenTitan working group. stm32 Change pertains to the stm32 family of MCUSs WG-Network In the purview of the Network working group. labels Jun 21, 2025
@lschuermann
Copy link
Member

I recently tried disallowing manual_let_else and I think it's a lint that we want to enable. It often produces cleaner expressions. However, it's somewhat invasive and probably should come in a follow-up PR.

Comment on lines -85 to +87
sensor_type: AnalogLightSensorType,
) -> AnalogLightSensor<'a, A> {
AnalogLightSensor {
sensor_type: AnalogTemperatureSensorType,
) -> Self {
Self {
Copy link
Member

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.

Copy link
Member

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.

@bradjc
Copy link
Contributor Author
bradjc commented Jun 21, 2025

manual_let_else

That is a pedantic lint, not style

@lschuermann lschuermann added the last-call Final review period for a pull request. label Jun 22, 2025
@lschuermann lschuermann added this pull request to the merge queue Jun 23, 2025
Merged via the queue into master with commit c83f070 Jun 23, 2025
21 checks passed
@lschuermann lschuermann deleted the clippy-style-2025-06 branch June 23, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel last-call Final review period for a pull request. sam4l Change pertains to the SAM4L MCU. stm32 Change pertains to the stm32 family of MCUSs tock-libraries This affects libraries supported by the Tock project WG-Network In the purview of the Network working group. WG-OpenTitan In the purview of the OpenTitan working group.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0