Skip to content
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

Fix some new 1.79 clippy findings #50

Merged
merged 2 commits into from
Jun 14, 2024
Merged

Fix some new 1.79 clippy findings #50

merged 2 commits into from
Jun 14, 2024

Conversation

cpu
Copy link
Member

@cpu cpu commented Jun 14, 2024

This branch fixes two new classes of clippy findings from the just-released 1.79 toolchain.

cpu added 2 commits June 14, 2024 09:46
This avoids the risk of type inference somehow changing our SAFETY
claim.

```
error: transmute used without annotations
   --> src/server_name.rs:445:27
    |
445 |             unsafe { mem::transmute::<_, [u8; 16]>(addr16) },
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider adding missing annotations: `transmute::<[u16; 8], [u8; 16]>`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_transmute_annotations
    = note: `-D clippy::missing-transmute-annotations` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::missing_transmute_annotations)]`

```
Of the form:

```
error: unnecessary structure name repetition
   --> src/server_name.rs:136:32
    |
136 |     pub fn borrow(&'a self) -> DnsName<'_> {
    |                                ^^^^^^^^^^^ help: use the applicable keyword: `Self`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
    = note: `-D clippy::use-self` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::use_self)]`
```
@cpu cpu self-assigned this Jun 14, 2024
@cpu cpu added this pull request to the merge queue Jun 14, 2024
Merged via the queue into rustls:main with commit b39d810 Jun 14, 2024
13 checks passed
@cpu cpu deleted the cpu-clippy-fixes branch June 14, 2024 13:58
@cpu
Copy link
Member Author

cpu commented Jun 14, 2024

I did a quick pass through the other repo scheduled CI runs from yesterday and it looks like this was the only one that had 1.79 lint findings 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants