update vcpkg #105
clippy
10 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 10 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.78.0 (9b00956e5 2024-04-29)
- cargo 1.78.0 (54d8815d0 2024-03-26)
- clippy 0.1.78 (9b00956 2024-04-29)
Annotations
Check warning on line 150 in src/main.rs
github-actions / clippy
parameter is only used in recursion
warning: parameter is only used in recursion
--> src/main.rs:150:22
|
150 | fn print_parse_error(input: &str, e: &ErrorTree<String>) {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_input`
|
note: parameter used here
--> src/main.rs:161:31
|
161 | print_parse_error(input, base);
| ^^^^^
...
180 | print_parse_error(input, alt);
| ^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion
= note: `#[warn(clippy::only_used_in_recursion)]` on by default
Check warning on line 44 in src/main.rs
github-actions / clippy
single-character string constant used as pattern
warning: single-character string constant used as pattern
--> src/main.rs:44:48
|
44 | .authors(env!("CARGO_PKG_AUTHORS").replace(":", ", "))
| ^^^ help: consider using a `char`: `':'`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
= note: `#[warn(clippy::single_char_pattern)]` on by default
Check warning on line 65 in src/mapping.rs
github-actions / clippy
this `impl` can be derived
warning: this `impl` can be derived
--> src/mapping.rs:61:1
|
61 | / impl Default for KeyStatus {
62 | | fn default() -> Self {
63 | | KeyStatus::Up
64 | | }
65 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
= note: `#[warn(clippy::derivable_impls)]` on by default
= help: remove the manual implementation...
help: ...and instead derive it...
|
40 + #[derive(Default)]
41 | enum KeyStatus {
|
help: ...and mark the default variant
|
42 ~ #[default]
43 ~ Up,
|
Check warning on line 24 in src/joystick.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> src/joystick.rs:15:5
|
15 | / fn handle(
16 | | &mut self,
17 | | stick: Vector2<f64>,
18 | | side: StickSide,
... |
23 | | dt: Duration,
24 | | );
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
Check warning on line 225 in src/engine.rs
github-actions / clippy
`Box::new(_)` of default value
warning: `Box::new(_)` of default value
--> src/engine.rs:225:42
|
225 | GyroSpace::PlayerTurn => Box::new(PlayerSpace::default()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::<PlayerSpace>::default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#box_default
Check warning on line 223 in src/engine.rs
github-actions / clippy
use of `default` to create a unit struct
warning: use of `default` to create a unit struct
--> src/engine.rs:223:60
|
223 | GyroSpace::WorldTurn => Box::new(WorldSpace::default()),
| ^^^^^^^^^^^ help: remove this call to `default`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs
Check warning on line 223 in src/engine.rs
github-actions / clippy
`Box::new(_)` of default value
warning: `Box::new(_)` of default value
--> src/engine.rs:223:41
|
223 | GyroSpace::WorldTurn => Box::new(WorldSpace::default()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::<WorldSpace>::default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#box_default
Check warning on line 222 in src/engine.rs
github-actions / clippy
use of `default` to create a unit struct
warning: use of `default` to create a unit struct
--> src/engine.rs:222:56
|
222 | GyroSpace::Local => Box::new(LocalSpace::default()),
| ^^^^^^^^^^^ help: remove this call to `default`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs
= note: `#[warn(clippy::default_constructed_unit_structs)]` on by default
Check warning on line 222 in src/engine.rs
github-actions / clippy
`Box::new(_)` of default value
warning: `Box::new(_)` of default value
--> src/engine.rs:222:37
|
222 | GyroSpace::Local => Box::new(LocalSpace::default()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::<LocalSpace>::default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#box_default
= note: `#[warn(clippy::box_default)]` on by default
Check warning on line 94 in src/config/mod.rs
github-actions / clippy
unnecessary closure used to substitute value for `Option::None`
warning: unnecessary closure used to substitute value for `Option::None`
--> src/config/mod.rs:84:15
|
84 | match action.event_mod.unwrap_or_else(|| {
| _______________^
85 | | if first {
86 | | if actions.len() == 1 {
87 | | Start
... |
93 | | }
94 | | }) {
| |__________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default
help: use `unwrap_or(..)` instead
|
84 ~ match action.event_mod.unwrap_or({
85 + if first {
86 + if actions.len() == 1 {
87 + Start
88 + } else {
89 + Tap
90 + }
91 + } else {
92 + Hold
93 + }
94 ~ }) {
|