implement climbing ladders/vines #1616
clippy
11 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 11 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.76.0-nightly (06e02d5b2 2023-12-09)
- cargo 1.76.0-nightly (978722961 2023-12-06)
- clippy 0.1.76 (06e02d5 2023-12-09)
Annotations
Check warning on line 267 in azalea-physics/src/lib.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> azalea-physics/src/lib.rs:267:62
|
267 | physics.velocity = handle_on_climbable(physics.velocity, &on_climbable, &position, world, pose);
| ^^^^^^^^^^^^^ help: change this to: `on_climbable`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 255 in azalea-physics/src/lib.rs
github-actions / clippy
this function has too many arguments (10/7)
warning: this function has too many arguments (10/7)
--> azalea-physics/src/lib.rs:243:1
|
243 | / fn handle_relative_friction_and_calculate_movement(
244 | | block_friction: f32,
245 | | world: &Instance,
246 | | physics: &mut Physics,
... |
254 | | jumping: &Jumping,
255 | | ) -> Vec3 {
| |_________^
|
= 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 195 in azalea-physics/src/collision/mod.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> azalea-physics/src/collision/mod.rs:195:72
|
195 | let _block_pos_below = azalea_entity::on_pos_legacy(&world.chunks, &position);
| ^^^^^^^^^ help: change this to: `position`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
Check warning on line 144 in azalea-entity/src/plugin/mod.rs
github-actions / clippy
this if-then-else expression assigns a bool literal
warning: this if-then-else expression assigns a bool literal
--> azalea-entity/src/plugin/mod.rs:138:16
|
138 | } else if azalea_registry::tags::blocks::TRAPDOORS.contains(®istry_block_at_feet)
| ________________^
139 | | && is_trapdoor_useable_as_ladder(block_state_at_feet, block_pos, &instance)
140 | | {
141 | | **on_climbable = true;
142 | | } else {
143 | | **on_climbable = false;
144 | | }
| |_________^ help: you can reduce it to: `**on_climbable = azalea_registry::tags::blocks::TRAPDOORS.contains(®istry_block_at_feet) && is_trapdoor_useable_as_ladder(block_state_at_feet, block_pos, &instance);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign
= note: `#[warn(clippy::needless_bool_assign)]` on by default
Check warning on line 138 in azalea-entity/src/plugin/mod.rs
github-actions / clippy
this `if` has identical blocks
warning: this `if` has identical blocks
--> azalea-entity/src/plugin/mod.rs:136:87
|
136 | if azalea_registry::tags::blocks::CLIMBABLE.contains(®istry_block_at_feet) {
| _______________________________________________________________________________________^
137 | | **on_climbable = true;
138 | | } else if azalea_registry::tags::blocks::TRAPDOORS.contains(®istry_block_at_feet)
| |_________^
|
note: same as this
--> azalea-entity/src/plugin/mod.rs:140:9
|
140 | / {
141 | | **on_climbable = true;
142 | | } else {
| |_________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
= note: `#[warn(clippy::if_same_then_else)]` on by default
Check warning on line 538 in azalea-block/azalea-block-macros/src/lib.rs
github-actions / clippy
this creates an owned instance just for comparison
warning: this creates an owned instance just for comparison
--> azalea-block/azalea-block-macros/src/lib.rs:538:54
|
538 | .find(|v| v.ident.to_string() == variant.to_string());
| -----------------------^^^^^^^^^^^^^^^^^^^
| |
| help: try: `variant == v.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned
Check warning on line 538 in azalea-block/azalea-block-macros/src/lib.rs
github-actions / clippy
this creates an owned instance just for comparison
warning: this creates an owned instance just for comparison
--> azalea-block/azalea-block-macros/src/lib.rs:538:31
|
538 | .find(|v| v.ident.to_string() == variant.to_string());
| ^^^^^^^^^^^^^^^^^^^ help: try: `v.ident`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned
= note: `#[warn(clippy::cmp_owned)]` on by default
Check warning on line 535 in azalea-block/azalea-block-macros/src/lib.rs
github-actions / clippy
use of `or_insert_with` to construct default value
warning: use of `or_insert_with` to construct default value
--> azalea-block/azalea-block-macros/src/lib.rs:535:22
|
535 | .or_insert_with(Vec::new);
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
= note: `#[warn(clippy::unwrap_or_default)]` on by default
Check warning on line 538 in azalea-block/azalea-block-macros/src/lib.rs
github-actions / clippy
this creates an owned instance just for comparison
warning: this creates an owned instance just for comparison
--> azalea-block/azalea-block-macros/src/lib.rs:538:54
|
538 | .find(|v| v.ident.to_string() == variant.to_string());
| -----------------------^^^^^^^^^^^^^^^^^^^
| |
| help: try: `variant == v.ident.to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned
Check warning on line 538 in azalea-block/azalea-block-macros/src/lib.rs
github-actions / clippy
this creates an owned instance just for comparison
warning: this creates an owned instance just for comparison
--> azalea-block/azalea-block-macros/src/lib.rs:538:31
|
538 | .find(|v| v.ident.to_string() == variant.to_string());
| ^^^^^^^^^^^^^^^^^^^ help: try: `v.ident`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned
= note: `#[warn(clippy::cmp_owned)]` on by default
Check warning on line 535 in azalea-block/azalea-block-macros/src/lib.rs
github-actions / clippy
use of `or_insert_with` to construct default value
warning: use of `or_insert_with` to construct default value
--> azalea-block/azalea-block-macros/src/lib.rs:535:22
|
535 | .or_insert_with(Vec::new);
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
= note: `#[warn(clippy::unwrap_or_default)]` on by default