avoid liquids and falling blocks when mining #1645
Annotations
23 warnings
very complex type used. Consider factoring parts into `type` definitions:
azalea/src/pathfinder/mod.rs#L662
warning: very complex type used. Consider factoring parts into `type` definitions
--> azalea/src/pathfinder/mod.rs:662:16
|
662 | mut query: Query<(
| ________________^
663 | | Entity,
664 | | &mut ExecutingPath,
665 | | &Position,
... |
669 | | &InventoryComponent,
670 | | )>,
| |______^
|
= 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
|
returning the result of a `let` binding from a block:
azalea/src/pathfinder/world.rs#L349
warning: returning the result of a `let` binding from a block
--> azalea/src/pathfinder/world.rs:349:21
|
345 | / let block_state = BlockState::try_from(
346 | | section.get_at_index(u16::from(ChunkSectionBlockPos::from(pos)) as usize),
347 | | )
348 | | .unwrap_or_default();
| |_________________________________________- unnecessary `let` binding
349 | block_state
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
|
345 ~
346 ~ BlockState::try_from(
347 + section.get_at_index(u16::from(ChunkSectionBlockPos::from(pos)) as usize),
348 + )
349 + .unwrap_or_default()
|
|
useless conversion to the same type: `azalea_block::BlockState`:
azalea/src/pathfinder/world.rs#L343
warning: useless conversion to the same type: `azalea_block::BlockState`
--> azalea/src/pathfinder/world.rs:343:31
|
343 | let block_state = BlockState::try_from(
| _______________________________^
344 | | self.with_section(ChunkSectionPos::from(pos), |section| {
345 | | let block_state = BlockState::try_from(
346 | | section.get_at_index(u16::from(ChunkSectionBlockPos::from(pos)) as usize),
... |
351 | | .unwrap_or_default(),
352 | | )
| |_____________^
|
= help: consider removing `BlockState::try_from()`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
this `if` statement can be collapsed:
azalea/src/pathfinder/world.rs#L380
warning: this `if` statement can be collapsed
--> azalea/src/pathfinder/world.rs:380:9
|
380 | / if !west_is_in_same_section {
381 | | if check_should_avoid_this_block(pos.west(1), &|b| mining_cache.is_liquid(b)) {
382 | | return f32::INFINITY;
383 | | }
384 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
380 ~ if !west_is_in_same_section && check_should_avoid_this_block(pos.west(1), &|b| mining_cache.is_liquid(b)) {
381 + return f32::INFINITY;
382 + }
|
|
this `if` statement can be collapsed:
azalea/src/pathfinder/world.rs#L375
warning: this `if` statement can be collapsed
--> azalea/src/pathfinder/world.rs:375:9
|
375 | / if !south_is_in_same_section {
376 | | if check_should_avoid_this_block(pos.south(1), &|b| mining_cache.is_liquid(b)) {
377 | | return f32::INFINITY;
378 | | }
379 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
375 ~ if !south_is_in_same_section && check_should_avoid_this_block(pos.south(1), &|b| mining_cache.is_liquid(b)) {
376 + return f32::INFINITY;
377 + }
|
|
this `if` statement can be collapsed:
azalea/src/pathfinder/world.rs#L370
warning: this `if` statement can be collapsed
--> azalea/src/pathfinder/world.rs:370:9
|
370 | / if !east_is_in_same_section {
371 | | if check_should_avoid_this_block(pos.east(1), &|b| mining_cache.is_liquid(b)) {
372 | | return f32::INFINITY;
373 | | }
374 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
370 ~ if !east_is_in_same_section && check_should_avoid_this_block(pos.east(1), &|b| mining_cache.is_liquid(b)) {
371 + return f32::INFINITY;
372 + }
|
|
this `if` statement can be collapsed:
azalea/src/pathfinder/world.rs#L365
warning: this `if` statement can be collapsed
--> azalea/src/pathfinder/world.rs:365:9
|
365 | / if !north_is_in_same_section {
366 | | if check_should_avoid_this_block(pos.north(1), &|b| mining_cache.is_liquid(b)) {
367 | | return f32::INFINITY;
368 | | }
369 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
365 ~ if !north_is_in_same_section && check_should_avoid_this_block(pos.north(1), &|b| mining_cache.is_liquid(b)) {
366 + return f32::INFINITY;
367 + }
|
|
this `if` statement can be collapsed:
azalea/src/pathfinder/world.rs#L358
warning: this `if` statement can be collapsed
--> azalea/src/pathfinder/world.rs:358:9
|
358 | / if !up_is_in_same_section {
359 | | if check_should_avoid_this_block(pos.up(1), &|b| {
360 | | mining_cache.is_liquid(b) || mining_cache.is_falling_block(b)
361 | | }) {
362 | | return f32::INFINITY;
363 | | }
364 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
= note: `#[warn(clippy::collapsible_if)]` on by default
help: collapse nested if block
|
358 ~ if !up_is_in_same_section && check_should_avoid_this_block(pos.up(1), &|b| {
359 + mining_cache.is_liquid(b) || mining_cache.is_falling_block(b)
360 + }) {
361 + return f32::INFINITY;
362 + }
|
|
lint `clippy::vtable_address_comparisons` has been renamed to `ambiguous_wide_pointer_comparisons`:
azalea-brigadier/src/tree/mod.rs#L297
warning: lint `clippy::vtable_address_comparisons` has been renamed to `ambiguous_wide_pointer_comparisons`
--> azalea-brigadier/src/tree/mod.rs:297:25
|
297 | #[allow(clippy::vtable_address_comparisons)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `ambiguous_wide_pointer_comparisons`
|
= note: `#[warn(renamed_and_removed_lints)]` on by default
|
very complex type used. Consider factoring parts into `type` definitions:
azalea/src/pathfinder/mod.rs#L662
warning: very complex type used. Consider factoring parts into `type` definitions
--> azalea/src/pathfinder/mod.rs:662:16
|
662 | mut query: Query<(
| ________________^
663 | | Entity,
664 | | &mut ExecutingPath,
665 | | &Position,
... |
669 | | &InventoryComponent,
670 | | )>,
| |______^
|
= 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
|
returning the result of a `let` binding from a block:
azalea/src/pathfinder/world.rs#L349
warning: returning the result of a `let` binding from a block
--> azalea/src/pathfinder/world.rs:349:21
|
345 | / let block_state = BlockState::try_from(
346 | | section.get_at_index(u16::from(ChunkSectionBlockPos::from(pos)) as usize),
347 | | )
348 | | .unwrap_or_default();
| |_________________________________________- unnecessary `let` binding
349 | block_state
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
|
345 ~
346 ~ BlockState::try_from(
347 + section.get_at_index(u16::from(ChunkSectionBlockPos::from(pos)) as usize),
348 + )
349 + .unwrap_or_default()
|
|
useless conversion to the same type: `azalea_block::BlockState`:
azalea/src/pathfinder/world.rs#L343
warning: useless conversion to the same type: `azalea_block::BlockState`
--> azalea/src/pathfinder/world.rs:343:31
|
343 | let block_state = BlockState::try_from(
| _______________________________^
344 | | self.with_section(ChunkSectionPos::from(pos), |section| {
345 | | let block_state = BlockState::try_from(
346 | | section.get_at_index(u16::from(ChunkSectionBlockPos::from(pos)) as usize),
... |
351 | | .unwrap_or_default(),
352 | | )
| |_____________^
|
= help: consider removing `BlockState::try_from()`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
this `if` statement can be collapsed:
azalea/src/pathfinder/world.rs#L380
warning: this `if` statement can be collapsed
--> azalea/src/pathfinder/world.rs:380:9
|
380 | / if !west_is_in_same_section {
381 | | if check_should_avoid_this_block(pos.west(1), &|b| mining_cache.is_liquid(b)) {
382 | | return f32::INFINITY;
383 | | }
384 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
380 ~ if !west_is_in_same_section && check_should_avoid_this_block(pos.west(1), &|b| mining_cache.is_liquid(b)) {
381 + return f32::INFINITY;
382 + }
|
|
this `if` statement can be collapsed:
azalea/src/pathfinder/world.rs#L375
warning: this `if` statement can be collapsed
--> azalea/src/pathfinder/world.rs:375:9
|
375 | / if !south_is_in_same_section {
376 | | if check_should_avoid_this_block(pos.south(1), &|b| mining_cache.is_liquid(b)) {
377 | | return f32::INFINITY;
378 | | }
379 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
375 ~ if !south_is_in_same_section && check_should_avoid_this_block(pos.south(1), &|b| mining_cache.is_liquid(b)) {
376 + return f32::INFINITY;
377 + }
|
|
this `if` statement can be collapsed:
azalea/src/pathfinder/world.rs#L370
warning: this `if` statement can be collapsed
--> azalea/src/pathfinder/world.rs:370:9
|
370 | / if !east_is_in_same_section {
371 | | if check_should_avoid_this_block(pos.east(1), &|b| mining_cache.is_liquid(b)) {
372 | | return f32::INFINITY;
373 | | }
374 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
370 ~ if !east_is_in_same_section && check_should_avoid_this_block(pos.east(1), &|b| mining_cache.is_liquid(b)) {
371 + return f32::INFINITY;
372 + }
|
|
this `if` statement can be collapsed:
azalea/src/pathfinder/world.rs#L365
warning: this `if` statement can be collapsed
--> azalea/src/pathfinder/world.rs:365:9
|
365 | / if !north_is_in_same_section {
366 | | if check_should_avoid_this_block(pos.north(1), &|b| mining_cache.is_liquid(b)) {
367 | | return f32::INFINITY;
368 | | }
369 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
365 ~ if !north_is_in_same_section && check_should_avoid_this_block(pos.north(1), &|b| mining_cache.is_liquid(b)) {
366 + return f32::INFINITY;
367 + }
|
|
this `if` statement can be collapsed:
azalea/src/pathfinder/world.rs#L358
warning: this `if` statement can be collapsed
--> azalea/src/pathfinder/world.rs:358:9
|
358 | / if !up_is_in_same_section {
359 | | if check_should_avoid_this_block(pos.up(1), &|b| {
360 | | mining_cache.is_liquid(b) || mining_cache.is_falling_block(b)
361 | | }) {
362 | | return f32::INFINITY;
363 | | }
364 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
= note: `#[warn(clippy::collapsible_if)]` on by default
help: collapse nested if block
|
358 ~ if !up_is_in_same_section && check_should_avoid_this_block(pos.up(1), &|b| {
359 + mining_cache.is_liquid(b) || mining_cache.is_falling_block(b)
360 + }) {
361 + return f32::INFINITY;
362 + }
|
|
lint `clippy::vtable_address_comparisons` has been renamed to `ambiguous_wide_pointer_comparisons`:
azalea-brigadier/src/tree/mod.rs#L297
warning: lint `clippy::vtable_address_comparisons` has been renamed to `ambiguous_wide_pointer_comparisons`
--> azalea-brigadier/src/tree/mod.rs:297:25
|
297 | #[allow(clippy::vtable_address_comparisons)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `ambiguous_wide_pointer_comparisons`
|
= note: `#[warn(renamed_and_removed_lints)]` on by default
|
clippy_check
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
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/
|