Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

bradjc
Copy link
Contributor

@bradjc bradjc commented Aug 23, 2023

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

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

Formatting

  • Ran make prepush.

@github-actions github-actions bot added kernel chips/sam4l Change pertains to the SAM4L MCU. chips/nrf Change pertains to the nRF5x family of MCUs. arch/risc-v RISC-V architecture WG-OpenTitan In the purview of the OpenTitan working group. chips/stm32 Change pertains to the stm32 family of MCUSs labels Aug 23, 2023
Self {
0: [0; SECTOR_SIZE as usize],
}
Self([0; SECTOR_SIZE as usize])
Copy link
Member

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!

lschuermann
lschuermann previously approved these changes Aug 23, 2023
Copy link
Member

@lschuermann lschuermann left a 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.

Copy link
Member

@ppannuto ppannuto left a 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] {
Copy link
Member

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 :/

@bradjc bradjc force-pushed the clippy-D-style branch 2 times, most recently from 6c36b07 to eb5d24c Compare August 25, 2023 13:34
ppannuto
ppannuto previously approved these changes Aug 29, 2023
lschuermann
lschuermann previously approved these changes Aug 29, 2023
hudson-ayers
hudson-ayers previously approved these changes Sep 5, 2023
alevy
alevy previously approved these changes Sep 7, 2023
@alevy alevy added this pull request to the merge queue Sep 7, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Sep 7, 2023
@bradjc bradjc dismissed stale reviews from alevy and hudson-ayers via 53983b5 September 8, 2023 16:01
@ppannuto ppannuto enabled auto-merge September 8, 2023 16:21
@ppannuto ppannuto added this pull request to the merge queue Sep 8, 2023
Merged via the queue into master with commit f79105f Sep 8, 2023
@ppannuto ppannuto deleted the clippy-D-style branch September 8, 2023 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch/risc-v RISC-V architecture chips/nrf Change pertains to the nRF5x family of MCUs. chips/sam4l Change pertains to the SAM4L MCU. chips/stm32 Change pertains to the stm32 family of MCUSs kernel WG-OpenTitan In the purview of the OpenTitan working group.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants