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

src: Fix 'contains_key' clippy lints #804

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

travier
Copy link
Member

@travier travier commented Dec 18, 2024

warning: unnecessary use of `get(k).is_some()`
   --> src/filetree.rs:187:34
    |
187 |                 if self.children.get(k).is_some() {
    |                                  ^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(k)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check
    = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default

```
warning: unnecessary use of `get(k).is_some()`
   --> src/filetree.rs:187:34
    |
187 |                 if self.children.get(k).is_some() {
    |                                  ^^^^^^^^^^^^^^^^ help: replace it with: `contains_key(k)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check
    = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default
```
@cgwalters cgwalters merged commit 26c5852 into coreos:main Dec 18, 2024
12 checks passed
@travier travier deleted the main-clippy-lints branch December 18, 2024 14:49
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