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

run clippy on tests, fix findings #6

Merged
merged 4 commits into from
Apr 5, 2024
Merged

run clippy on tests, fix findings #6

merged 4 commits into from
Apr 5, 2024

Conversation

cpu
Copy link
Member

@cpu cpu commented Apr 5, 2024

Noticed there were some clippy warnings in the CI test output. It looks like rustls-ffi wasn't running clippy on tests and this repo inherited that. I'll fix over there as well but as expected there are a lot more findings to squash. This repo has managed to avoid accruing too many. Let's keep it at zero by adding this to CI.

cpu added 4 commits April 5, 2024 10:54
```
warning: the item `ptr` is imported redundantly
    --> src/entry.rs:1146:9
     |
1145 |     use super::*;
     |         -------- the item `ptr` is already imported here
1146 |     use core::ptr;
     |         ^^^^^^^^^
     |
     = note: `#[warn(unused_imports)]` on by default
```
```
error: the borrowed expression implements the required traits
  --> tests/runner.rs:20:19
   |
20 |               .args(&[
   |  ___________________^
21 | |                 "s_server",
22 | |                 "-cert",
23 | |                 "test-ca/rsa/end.cert",
...  |
32 | |                 "-rev",
33 | |             ])
   | |_____________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
   = note: `-D clippy::needless-borrows-for-generic-args` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::needless_borrows_for_generic_args)]`
```
This ensures we lint test code as well.
@cpu cpu merged commit ca69716 into rustls:main Apr 5, 2024
10 checks passed
@cpu cpu deleted the cpu-clippy-fix branch April 5, 2024 20:28
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