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 clippy issues #40

Merged
merged 2 commits into from
May 13, 2024
Merged

Fix clippy issues #40

merged 2 commits into from
May 13, 2024

Conversation

rnestler
Copy link
Collaborator

The result of running cargo clippy --fix --all-targets --all-features.

@rnestler rnestler requested a review from dbrgn May 12, 2024 15:44
@rnestler rnestler self-assigned this May 12, 2024
The result of running `cargo clippy --fix --all-targets --all-features`
twice.
@rnestler rnestler force-pushed the fix-clippy-issues branch from 2a97315 to a2f9295 Compare May 12, 2024 15:46
    warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used
      --> examples/monitor-shtc3.rs:43:9
       |
    43 |           for key in io::stdin().keys() {
       |           ^          ------------------ help: try: `io::stdin().keys().flatten()`
       |  _________|
       | |
    44 | |             if let Ok(Key::Ctrl('c')) = key {
    45 | |                 running.store(false, Ordering::SeqCst);
    46 | |                 break;
    47 | |             }
    48 | |         }
       | |_________^
       |
    help: ...and remove the `if let` statement in the for loop
      --> examples/monitor-shtc3.rs:44:13
       |
    44 | /             if let Ok(Key::Ctrl('c')) = key {
    45 | |                 running.store(false, Ordering::SeqCst);
    46 | |                 break;
    47 | |             }
       | |_____________^
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten
       = note: `#[warn(clippy::manual_flatten)]` on by default
@dbrgn
Copy link
Owner

dbrgn commented May 13, 2024

Thanks, LGTM! I think the two commits can be squashed.

@dbrgn dbrgn merged commit 0cfcb5d into main May 13, 2024
5 checks passed
@dbrgn dbrgn deleted the fix-clippy-issues branch May 13, 2024 11:47
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