Skip to content

chore: fix many clippy lints #38

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 1 commit into from
Jun 17, 2025
Merged

chore: fix many clippy lints #38

merged 1 commit into from
Jun 17, 2025

Conversation

VuiMuich
Copy link
Contributor

Poking around your repo got me in the mood of fixing some clippy lints, so I ran

> cargo clippy --fix --allow-dirty -- -D warnings -W clippy::pedantic -A clippy::missing_errors_doc -A clippy::missing_panics_doc -A clippy::too_many_lines

and fixed everything remaining except those two:

    Checking impala v0.2.4 (/home/vuimuich/Git/impala)
warning: wildcard matches only a single variant and will also match any future added variants
   --> src/access_point.rs:164:13
    |
164 |             _ => Text::from("  SSID name"),
    |             ^ help: try: `APFocusedSection::PSK`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
    = note: `-D clippy::match-wildcard-for-single-variants` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::match_wildcard_for_single_variants)]`

warning: wildcard matches only a single variant and will also match any future added variants
   --> src/access_point.rs:169:13
    |
169 |             _ => Text::from("  SSID password"),
    |             ^ help: try: `APFocusedSection::SSID`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants

warning: `impala` (lib) generated 2 warnings
warning: `impala` (lib test) generated 2 warnings (2 duplicates)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.30s

@VuiMuich VuiMuich force-pushed the main branch 2 times, most recently from 5471760 to 7559a8a Compare June 10, 2025 15:59
@VuiMuich
Copy link
Contributor Author

Ok -A clippy::must_use_candidate would have been a good addition in the first place...

@pythops
Copy link
Owner

pythops commented Jun 10, 2025

I am wondering why this is not good enough

cargo clippy --workspace --all-features -- -D warnings

that's what configured in the CI ?

I am open for a better CI ofc

@VuiMuich
Copy link
Contributor Author

It is absolutely find for a ci runner to have a bit more relaxed clippy lints imo.
Personally I find it helpful to run clippy pedantic every now and then to keep up with the latest improvements.
I see it more like a lesson for me, to improve code style.

I totally see, how this PR might be seen as slightly offensive and I want to sincerely apologize, that was in no way my intention, nor was it to show off or something. I just was - as I said - in the mood for a little clippy pedantic session on a repo, where the necessary fixes looked like they won't involve huge refactoring.

@pythops
Copy link
Owner

pythops commented Jun 11, 2025

Personally I find it helpful to run clippy pedantic every now and then to keep up with the latest improvements.

Good point

I totally see, how this PR might be seen as slightly offensive and I want to sincerely apologize

No, it is not offensive and there is no need to apologize.

I will look at it today, thanks for the PR 🙏

@pythops
Copy link
Owner

pythops commented Jun 17, 2025

Thanks again for the PR buddy

@pythops pythops merged commit 928d258 into pythops:main Jun 17, 2025
1 check passed
@VuiMuich
Copy link
Contributor Author

You are very welcome and also thanks again for the merge.

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