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

Clippy: implement suggested code improvements #86

Open
duskoo opened this issue Jun 21, 2020 · 1 comment
Open

Clippy: implement suggested code improvements #86

duskoo opened this issue Jun 21, 2020 · 1 comment
Labels
good first issue Good for newcomers

Comments

@duskoo
Copy link
Collaborator

duskoo commented Jun 21, 2020

cargo clippy -h
Checks a package to catch common mistakes and improve your Rust code.

Example clippy suggestions for app-backend-rust repo:

warning: this let-binding has unit value
  --> src/ios/ios_interface.rs:43:5
   |
43 |     let _ = simple_logger::setup_logger(filter_level, coepi_only);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `simple_logger::setup_logger(filter_level, coepi_only);`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value

warning: using `clone` on a `Copy` type
  --> src/reporting/public_report.rs:46:21
   |
46 |         let other = inputs.ids.contains(&SymptomId::Other).clone();
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `inputs.ids.contains(&SymptomId::Other)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

Tasks:

@duskoo duskoo added the good first issue Good for newcomers label Jun 21, 2020
@ivnsch
Copy link
Collaborator

ivnsch commented Jun 22, 2020

Let's create a separate issue for the CI (in general). Ideally we should use Github actions like the TCN repo.

Edit: CI issue: #90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants