Skip to content

different travel function in water

Sign in for the full log view
GitHub Actions / clippy succeeded Jan 9, 2025 in 0s

clippy

21 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 21
Note 0
Help 0

Versions

  • rustc 1.86.0-nightly (a580b5c37 2025-01-08)
  • cargo 1.86.0-nightly (fd784878c 2025-01-03)
  • clippy 0.1.85 (a580b5c379 2025-01-08)

Annotations

Check warning on line 305 in azalea-physics/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded late initialization

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 ~         };
    |

Check warning on line 205 in azalea-physics/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (9/7)

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

Check warning on line 165 in azalea-physics/src/lib.rs

See this annotation in the file changed.

@github-actions 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: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

Check warning on line 163 in azalea-physics/src/lib.rs

See this annotation in the file changed.

@github-actions 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: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

Check warning on line 135 in azalea-physics/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (9/7)

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

Check warning on line 117 in azalea-physics/src/lib.rs

See this annotation in the file changed.

@github-actions 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: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

Check warning on line 115 in azalea-physics/src/lib.rs

See this annotation in the file changed.

@github-actions 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: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

Check warning on line 113 in azalea-physics/src/lib.rs

See this annotation in the file changed.

@github-actions 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: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

Check warning on line 31 in azalea-physics/src/fluids.rs

See this annotation in the file changed.

@github-actions 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/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

Check warning on line 19 in azalea-physics/src/fluids.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

very complex type used. Consider factoring parts into `type` definitions

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

Check warning on line 203 in azalea-physics/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `jumping`

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`

Check warning on line 202 in azalea-physics/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `pose`

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`

Check warning on line 250 in azalea-physics/src/fluids.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `direction`

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`

Check warning on line 249 in azalea-physics/src/fluids.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `pos`

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`

Check warning on line 248 in azalea-physics/src/fluids.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `world`

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`

Check warning on line 247 in azalea-physics/src/fluids.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `block_state`

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`

Check warning on line 43 in azalea-physics/src/fluids.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `position`

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

Check warning on line 9 in azalea-physics/src/fluids.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `EntityKind`

warning: unused import: `EntityKind`
 --> azalea-physics/src/fluids.rs:9:23
  |
9 | use azalea_registry::{EntityKind, Fluid};
  |                       ^^^^^^^^^^

Check warning on line 8 in azalea-physics/src/fluids.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `metadata::AbstractBoat`

warning: unused import: `metadata::AbstractBoat`
 --> azalea-physics/src/fluids.rs:8:21
  |
8 | use azalea_entity::{metadata::AbstractBoat, InLoadedChunk, LocalEntity, Physics, Position};
  |                     ^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 1 in azalea-physics/src/fluids.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `std::cmp`

warning: unused import: `std::cmp`
 --> azalea-physics/src/fluids.rs:1:5
  |
1 | use std::cmp;
  |     ^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

Check warning on line 15 in azalea-entity/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `collections::HashMap`

warning: unused import: `collections::HashMap`
  --> azalea-entity/src/lib.rs:15:5
   |
15 |     collections::HashMap,
   |     ^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default