We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
After running command cargo clippy, you get quite a lot of warnings, for example:
cargo clippy
warning: redundant field names in struct initialization --> src/main.rs:125:9 | 125 | delay_time: delay_time, | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `delay_time` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names warning: operator precedence can trip the unwary --> src/main.rs:248:59 | 248 | .app_data(web::PayloadConfig::default().limit(100 * 2 << 20)) | ^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(100 * 2) << 20` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence = note: `#[warn(clippy::precedence)]` on by default warning: unneeded `return` statement --> src/logs/mod.rs:25:9 | 25 | / return Self { 26 | | total: LogStats { 27 | | message_count: 0, 28 | | byte_count: 0, 29 | | }, 30 | | ipaddr: HashMap::new(), 31 | | }; | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `#[warn(clippy::needless_return)]` on by default = help: remove `return`
ideally, all of them should be fixed and then cargo clippy should be added to the CI.
Note: I've had some problems with clippy on MacOS in the history, but it worked for me on version clippy 0.1.66 (90743e72 2023-01-10).
clippy 0.1.66 (90743e72 2023-01-10)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
After running command
cargo clippy
, you get quite a lot of warnings, for example:ideally, all of them should be fixed and then
cargo clippy
should be added to the CI.Note: I've had some problems with clippy on MacOS in the history, but it worked for me on version
clippy 0.1.66 (90743e72 2023-01-10)
.The text was updated successfully, but these errors were encountered: