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

selabel: Fix clippy lint #61

Merged
merged 1 commit into from
Jan 17, 2025
Merged

Conversation

travier
Copy link
Member

@travier travier commented Jan 17, 2025

warning: manual case-insensitive ASCII comparison
   --> src/selabel.rs:248:16
    |
248 |             if key.trim().to_ascii_uppercase() == "SELINUXTYPE" {
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ignore_case_cmp
    = note: `#[warn(clippy::manual_ignore_case_cmp)]` on by default
help: consider using `.eq_ignore_ascii_case()` instead
    |
248 |             if key.trim().eq_ignore_ascii_case("SELINUXTYPE") {
    |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

```
warning: manual case-insensitive ASCII comparison
   --> src/selabel.rs:248:16
    |
248 |             if key.trim().to_ascii_uppercase() == "SELINUXTYPE" {
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ignore_case_cmp
    = note: `#[warn(clippy::manual_ignore_case_cmp)]` on by default
help: consider using `.eq_ignore_ascii_case()` instead
    |
248 |             if key.trim().eq_ignore_ascii_case("SELINUXTYPE") {
    |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

Signed-off-by: Timothée Ravier <[email protected]>
@cgwalters cgwalters merged commit 78f37ea into containers:main Jan 17, 2025
4 checks passed
@travier travier deleted the main-clippy-lint branch January 17, 2025 17:09
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