Adding build mode for structures #510
clippy
4 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 4 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.75.0-nightly (df871fbf0 2023-10-24)
- cargo 1.75.0-nightly (d2f6a0485 2023-10-20)
- clippy 0.1.75 (df871fb 2023-10-24)
Annotations
Check failure on line 295 in cosmos_client/src/structure/ship/build_mode.rs
github-actions / clippy
useless conversion to the same type: `bevy::prelude::Color`
error: useless conversion to the same type: `bevy::prelude::Color`
--> cosmos_client/src/structure/ship/build_mode.rs:295:40
|
295 | ... color: Color::rgb(0.0, 0.0, 1.0).into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Color::rgb(0.0, 0.0, 1.0)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check failure on line 270 in cosmos_client/src/structure/ship/build_mode.rs
github-actions / clippy
useless conversion to the same type: `bevy::prelude::Color`
error: useless conversion to the same type: `bevy::prelude::Color`
--> cosmos_client/src/structure/ship/build_mode.rs:270:40
|
270 | ... color: Color::rgb(0.0, 1.0, 0.0).into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Color::rgb(0.0, 1.0, 0.0)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check failure on line 245 in cosmos_client/src/structure/ship/build_mode.rs
github-actions / clippy
useless conversion to the same type: `bevy::prelude::Color`
error: useless conversion to the same type: `bevy::prelude::Color`
--> cosmos_client/src/structure/ship/build_mode.rs:245:40
|
245 | ... color: Color::rgb(1.0, 0.0, 0.0).into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Color::rgb(1.0, 0.0, 0.0)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `-D clippy::useless-conversion` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::useless_conversion)]`
Check failure on line 44 in cosmos_client/src/structure/ship/build_mode.rs
github-actions / clippy
this `if` statement can be collapsed
error: this `if` statement can be collapsed
--> cosmos_client/src/structure/ship/build_mode.rs:37:5
|
37 | / if local_player_in_build_mode.get_single().is_ok() {
38 | | if input_handler.check_just_pressed(CosmosInputs::ToggleBuildMode) {
39 | | client.send_message(
40 | | NettyChannelClient::Reliable,
... |
43 | | }
44 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
= note: `-D clippy::collapsible-if` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::collapsible_if)]`
help: collapse nested if block
|
37 ~ if local_player_in_build_mode.get_single().is_ok() && input_handler.check_just_pressed(CosmosInputs::ToggleBuildMode) {
38 + client.send_message(
39 + NettyChannelClient::Reliable,
40 + cosmos_encoder::serialize(&ClientReliableMessages::ExitBuildMode),
41 + );
42 + }
|