You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
run cargo clippy and apply suggested code improvements.
Example clippy suggestions for app-backend-rust repo:
Tasks:
The text was updated successfully, but these errors were encountered: