different travel function in water #2064
Annotations
47 warnings
unneeded late initialization:
azalea-physics/src/lib.rs#L305
warning: unneeded late initialization
--> azalea-physics/src/lib.rs:305:9
|
305 | let new_y_velocity;
| ^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init
= note: `#[warn(clippy::needless_late_init)]` on by default
help: move the declaration `new_y_velocity` here and remove the assignments from the branches
|
305 ~
306 ~ let new_y_velocity = if moving_down
307 | && (new_velocity.y - 0.005).abs() >= 0.003
308 | && f64::abs(new_velocity.y - gravity / 16.0) < 0.003
309 | {
310 ~ -0.003
311 | } else {
312 ~ new_velocity.y - gravity / 16.0
313 ~ };
|
|
this function has too many arguments (9/7):
azalea-physics/src/lib.rs#L195
warning: this function has too many arguments (9/7)
--> azalea-physics/src/lib.rs:195:1
|
195 | / fn travel_in_fluid(
196 | | physics: &mut Physics,
197 | | direction: &LookDirection,
198 | | mut position: Mut<Position>,
... |
204 | | world: &Instance,
205 | | ) {
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this expression creates a reference which is immediately dereferenced by the compiler:
azalea-physics/src/lib.rs#L165
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> azalea-physics/src/lib.rs:165:24
|
165 | direction: &direction,
| ^^^^^^^^^^ help: change this to: `direction`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
azalea-physics/src/lib.rs#L163
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> azalea-physics/src/lib.rs:163:20
|
163 | world: &world,
| ^^^^^^ help: change this to: `world`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this function has too many arguments (9/7):
azalea-physics/src/lib.rs#L125
warning: this function has too many arguments (9/7)
--> azalea-physics/src/lib.rs:125:1
|
125 | / fn travel_in_air(
126 | | physics: &mut Physics,
127 | | direction: &LookDirection,
128 | | position: Mut<Position>,
... |
134 | | world: &Instance,
135 | | ) {
| |_^
|
= 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
|
this expression creates a reference which is immediately dereferenced by the compiler:
azalea-physics/src/lib.rs#L117
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> azalea-physics/src/lib.rs:117:17
|
117 | &jumping,
| ^^^^^^^^ help: change this to: `jumping`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
azalea-physics/src/lib.rs#L115
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> azalea-physics/src/lib.rs:115:17
|
115 | &on_climbable,
| ^^^^^^^^^^^^^ help: change this to: `on_climbable`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
azalea-physics/src/lib.rs#L113
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> azalea-physics/src/lib.rs:113:17
|
113 | &attributes,
| ^^^^^^^^^^^ help: change this to: `attributes`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
azalea-physics/src/fluids.rs#L31
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> azalea-physics/src/fluids.rs:31:82
|
31 | update_in_water_state_and_do_water_current_pushing(&mut physics, &world, &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
|
very complex type used. Consider factoring parts into `type` definitions:
azalea-physics/src/fluids.rs#L16
warning: very complex type used. Consider factoring parts into `type` definitions
--> azalea-physics/src/fluids.rs:16:16
|
16 | mut query: Query<
| ________________^
17 | | (&mut Physics, &Position, &InstanceName),
18 | | (With<LocalEntity>, With<InLoadedChunk>),
19 | | >,
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default
|
unused variable: `jumping`:
azalea-physics/src/lib.rs#L203
warning: unused variable: `jumping`
--> azalea-physics/src/lib.rs:203:5
|
203 | jumping: &Jumping,
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_jumping`
|
unused variable: `pose`:
azalea-physics/src/lib.rs#L202
warning: unused variable: `pose`
--> azalea-physics/src/lib.rs:202:5
|
202 | pose: Option<&Pose>,
| ^^^^ help: if this is intentional, prefix it with an underscore: `_pose`
|
unused variable: `direction`:
azalea-physics/src/fluids.rs#L250
warning: unused variable: `direction`
--> azalea-physics/src/fluids.rs:250:5
|
250 | direction: Direction,
| ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_direction`
|
unused variable: `pos`:
azalea-physics/src/fluids.rs#L249
warning: unused variable: `pos`
--> azalea-physics/src/fluids.rs:249:5
|
249 | pos: BlockPos,
| ^^^ help: if this is intentional, prefix it with an underscore: `_pos`
|
unused variable: `world`:
azalea-physics/src/fluids.rs#L248
warning: unused variable: `world`
--> azalea-physics/src/fluids.rs:248:5
|
248 | world: &Instance,
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_world`
|
unused variable: `block_state`:
azalea-physics/src/fluids.rs#L247
warning: unused variable: `block_state`
--> azalea-physics/src/fluids.rs:247:5
|
247 | block_state: BlockState,
| ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_block_state`
|
unused variable: `position`:
azalea-physics/src/fluids.rs#L43
warning: unused variable: `position`
--> azalea-physics/src/fluids.rs:43:5
|
43 | position: &Position,
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_position`
|
= note: `#[warn(unused_variables)]` on by default
|
unused import: `EntityKind`:
azalea-physics/src/fluids.rs#L9
warning: unused import: `EntityKind`
--> azalea-physics/src/fluids.rs:9:23
|
9 | use azalea_registry::{EntityKind, Fluid};
| ^^^^^^^^^^
|
unused import: `metadata::AbstractBoat`:
azalea-physics/src/fluids.rs#L8
warning: unused import: `metadata::AbstractBoat`
--> azalea-physics/src/fluids.rs:8:21
|
8 | use azalea_entity::{metadata::AbstractBoat, InLoadedChunk, LocalEntity, Physics, Position};
| ^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `std::cmp`:
azalea-physics/src/fluids.rs#L1
warning: unused import: `std::cmp`
--> azalea-physics/src/fluids.rs:1:5
|
1 | use std::cmp;
| ^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
unused import: `collections::HashMap`:
azalea-entity/src/lib.rs#L15
warning: unused import: `collections::HashMap`
--> azalea-entity/src/lib.rs:15:5
|
15 | collections::HashMap,
| ^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
unneeded late initialization:
azalea-physics/src/lib.rs#L305
warning: unneeded late initialization
--> azalea-physics/src/lib.rs:305:9
|
305 | let new_y_velocity;
| ^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init
= note: `#[warn(clippy::needless_late_init)]` on by default
help: move the declaration `new_y_velocity` here and remove the assignments from the branches
|
305 ~
306 ~ let new_y_velocity = if moving_down
307 | && (new_velocity.y - 0.005).abs() >= 0.003
308 | && f64::abs(new_velocity.y - gravity / 16.0) < 0.003
309 | {
310 ~ -0.003
311 | } else {
312 ~ new_velocity.y - gravity / 16.0
313 ~ };
|
|
this function has too many arguments (9/7):
azalea-physics/src/lib.rs#L195
warning: this function has too many arguments (9/7)
--> azalea-physics/src/lib.rs:195:1
|
195 | / fn travel_in_fluid(
196 | | physics: &mut Physics,
197 | | direction: &LookDirection,
198 | | mut position: Mut<Position>,
... |
204 | | world: &Instance,
205 | | ) {
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this expression creates a reference which is immediately dereferenced by the compiler:
azalea-physics/src/lib.rs#L165
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> azalea-physics/src/lib.rs:165:24
|
165 | direction: &direction,
| ^^^^^^^^^^ help: change this to: `direction`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
azalea-physics/src/lib.rs#L163
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> azalea-physics/src/lib.rs:163:20
|
163 | world: &world,
| ^^^^^^ help: change this to: `world`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this function has too many arguments (9/7):
azalea-physics/src/lib.rs#L125
warning: this function has too many arguments (9/7)
--> azalea-physics/src/lib.rs:125:1
|
125 | / fn travel_in_air(
126 | | physics: &mut Physics,
127 | | direction: &LookDirection,
128 | | position: Mut<Position>,
... |
134 | | world: &Instance,
135 | | ) {
| |_^
|
= 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
|
this expression creates a reference which is immediately dereferenced by the compiler:
azalea-physics/src/lib.rs#L117
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> azalea-physics/src/lib.rs:117:17
|
117 | &jumping,
| ^^^^^^^^ help: change this to: `jumping`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
azalea-physics/src/lib.rs#L115
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> azalea-physics/src/lib.rs:115:17
|
115 | &on_climbable,
| ^^^^^^^^^^^^^ help: change this to: `on_climbable`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
azalea-physics/src/lib.rs#L113
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> azalea-physics/src/lib.rs:113:17
|
113 | &attributes,
| ^^^^^^^^^^^ help: change this to: `attributes`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
azalea-physics/src/fluids.rs#L31
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> azalea-physics/src/fluids.rs:31:82
|
31 | update_in_water_state_and_do_water_current_pushing(&mut physics, &world, &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
|
very complex type used. Consider factoring parts into `type` definitions:
azalea-physics/src/fluids.rs#L16
warning: very complex type used. Consider factoring parts into `type` definitions
--> azalea-physics/src/fluids.rs:16:16
|
16 | mut query: Query<
| ________________^
17 | | (&mut Physics, &Position, &InstanceName),
18 | | (With<LocalEntity>, With<InLoadedChunk>),
19 | | >,
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default
|
unused variable: `jumping`:
azalea-physics/src/lib.rs#L203
warning: unused variable: `jumping`
--> azalea-physics/src/lib.rs:203:5
|
203 | jumping: &Jumping,
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_jumping`
|
unused variable: `pose`:
azalea-physics/src/lib.rs#L202
warning: unused variable: `pose`
--> azalea-physics/src/lib.rs:202:5
|
202 | pose: Option<&Pose>,
| ^^^^ help: if this is intentional, prefix it with an underscore: `_pose`
|
unused variable: `direction`:
azalea-physics/src/fluids.rs#L250
warning: unused variable: `direction`
--> azalea-physics/src/fluids.rs:250:5
|
250 | direction: Direction,
| ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_direction`
|
unused variable: `pos`:
azalea-physics/src/fluids.rs#L249
warning: unused variable: `pos`
--> azalea-physics/src/fluids.rs:249:5
|
249 | pos: BlockPos,
| ^^^ help: if this is intentional, prefix it with an underscore: `_pos`
|
unused variable: `world`:
azalea-physics/src/fluids.rs#L248
warning: unused variable: `world`
--> azalea-physics/src/fluids.rs:248:5
|
248 | world: &Instance,
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_world`
|
unused variable: `block_state`:
azalea-physics/src/fluids.rs#L247
warning: unused variable: `block_state`
--> azalea-physics/src/fluids.rs:247:5
|
247 | block_state: BlockState,
| ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_block_state`
|
unused variable: `position`:
azalea-physics/src/fluids.rs#L43
warning: unused variable: `position`
--> azalea-physics/src/fluids.rs:43:5
|
43 | position: &Position,
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_position`
|
= note: `#[warn(unused_variables)]` on by default
|
unused import: `EntityKind`:
azalea-physics/src/fluids.rs#L9
warning: unused import: `EntityKind`
--> azalea-physics/src/fluids.rs:9:23
|
9 | use azalea_registry::{EntityKind, Fluid};
| ^^^^^^^^^^
|
unused import: `metadata::AbstractBoat`:
azalea-physics/src/fluids.rs#L8
warning: unused import: `metadata::AbstractBoat`
--> azalea-physics/src/fluids.rs:8:21
|
8 | use azalea_entity::{metadata::AbstractBoat, InLoadedChunk, LocalEntity, Physics, Position};
| ^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `std::cmp`:
azalea-physics/src/fluids.rs#L1
warning: unused import: `std::cmp`
--> azalea-physics/src/fluids.rs:1:5
|
1 | use std::cmp;
| ^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
unused import: `collections::HashMap`:
azalea-entity/src/lib.rs#L15
warning: unused import: `collections::HashMap`
--> azalea-entity/src/lib.rs:15:5
|
15 | collections::HashMap,
| ^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
clippy_check
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
clippy_check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
clippy_check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
clippy_check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
clippy_check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|