Skip to content

fix sometimes being able to mine blocks through walls #1893

fix sometimes being able to mine blocks through walls

fix sometimes being able to mine blocks through walls #1893

GitHub Actions / clippy succeeded Aug 11, 2024 in 0s

clippy

12 warnings

Details

Results

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

Versions

  • rustc 1.82.0-nightly (730d5d409 2024-08-10)
  • cargo 1.82.0-nightly (0d8d22f83 2024-08-08)
  • clippy 0.1.82 (730d5d4 2024-08-10)

Annotations

Check warning on line 182 in azalea/src/pathfinder/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this bound is already specified as the supertrait of `Goal`

warning: this bound is already specified as the supertrait of `Goal`
   --> azalea/src/pathfinder/mod.rs:182:60
    |
182 |     fn goto_without_mining(&self, goal: impl Goal + Send + Sync + 'static) {
    |                                                            ^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implied_bounds_in_impls
help: try removing this bound
    |
182 -     fn goto_without_mining(&self, goal: impl Goal + Send + Sync + 'static) {
182 +     fn goto_without_mining(&self, goal: impl Goal + Send + 'static) {
    |

Check warning on line 182 in azalea/src/pathfinder/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this bound is already specified as the supertrait of `Goal`

warning: this bound is already specified as the supertrait of `Goal`
   --> azalea/src/pathfinder/mod.rs:182:53
    |
182 |     fn goto_without_mining(&self, goal: impl Goal + Send + Sync + 'static) {
    |                                                     ^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implied_bounds_in_impls
help: try removing this bound
    |
182 -     fn goto_without_mining(&self, goal: impl Goal + Send + Sync + 'static) {
182 +     fn goto_without_mining(&self, goal: impl Goal + Sync + 'static) {
    |

Check warning on line 171 in azalea/src/pathfinder/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this bound is already specified as the supertrait of `Goal`

warning: this bound is already specified as the supertrait of `Goal`
   --> azalea/src/pathfinder/mod.rs:171:45
    |
171 |     fn goto(&self, goal: impl Goal + Send + Sync + 'static) {
    |                                             ^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implied_bounds_in_impls
help: try removing this bound
    |
171 -     fn goto(&self, goal: impl Goal + Send + Sync + 'static) {
171 +     fn goto(&self, goal: impl Goal + Send + 'static) {
    |

Check warning on line 171 in azalea/src/pathfinder/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this bound is already specified as the supertrait of `Goal`

warning: this bound is already specified as the supertrait of `Goal`
   --> azalea/src/pathfinder/mod.rs:171:38
    |
171 |     fn goto(&self, goal: impl Goal + Send + Sync + 'static) {
    |                                      ^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implied_bounds_in_impls
help: try removing this bound
    |
171 -     fn goto(&self, goal: impl Goal + Send + Sync + 'static) {
171 +     fn goto(&self, goal: impl Goal + Sync + 'static) {
    |

Check warning on line 104 in azalea/src/pathfinder/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this bound is already specified as the supertrait of `Goal`

warning: this bound is already specified as the supertrait of `Goal`
   --> azalea/src/pathfinder/mod.rs:104:60
    |
104 |     fn goto_without_mining(&self, goal: impl Goal + Send + Sync + 'static);
    |                                                            ^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implied_bounds_in_impls
help: try removing this bound
    |
104 -     fn goto_without_mining(&self, goal: impl Goal + Send + Sync + 'static);
104 +     fn goto_without_mining(&self, goal: impl Goal + Send + 'static);
    |

Check warning on line 104 in azalea/src/pathfinder/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this bound is already specified as the supertrait of `Goal`

warning: this bound is already specified as the supertrait of `Goal`
   --> azalea/src/pathfinder/mod.rs:104:53
    |
104 |     fn goto_without_mining(&self, goal: impl Goal + Send + Sync + 'static);
    |                                                     ^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implied_bounds_in_impls
help: try removing this bound
    |
104 -     fn goto_without_mining(&self, goal: impl Goal + Send + Sync + 'static);
104 +     fn goto_without_mining(&self, goal: impl Goal + Sync + 'static);
    |

Check warning on line 103 in azalea/src/pathfinder/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this bound is already specified as the supertrait of `Goal`

warning: this bound is already specified as the supertrait of `Goal`
   --> azalea/src/pathfinder/mod.rs:103:45
    |
103 |     fn goto(&self, goal: impl Goal + Send + Sync + 'static);
    |                                             ^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implied_bounds_in_impls
help: try removing this bound
    |
103 -     fn goto(&self, goal: impl Goal + Send + Sync + 'static);
103 +     fn goto(&self, goal: impl Goal + Send + 'static);
    |

Check warning on line 103 in azalea/src/pathfinder/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this bound is already specified as the supertrait of `Goal`

warning: this bound is already specified as the supertrait of `Goal`
   --> azalea/src/pathfinder/mod.rs:103:38
    |
103 |     fn goto(&self, goal: impl Goal + Send + Sync + 'static);
    |                                      ^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implied_bounds_in_impls
    = note: `#[warn(clippy::implied_bounds_in_impls)]` on by default
help: try removing this bound
    |
103 -     fn goto(&self, goal: impl Goal + Send + Sync + 'static);
103 +     fn goto(&self, goal: impl Goal + Sync + 'static);
    |

Check warning on line 161 in azalea/src/pathfinder/simulation.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

called `map(..).flatten()` on `Option`

warning: called `map(..).flatten()` on `Option`
   --> azalea/src/pathfinder/simulation.rs:160:14
    |
160 |               .map(|c| *c)
    |  ______________^
161 | |             .flatten()
    | |______________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|c| *c)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
    = note: `#[warn(clippy::map_flatten)]` on by default

Check warning on line 53 in azalea/src/pathfinder/extras/process/mine_forever.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `if` statement can be collapsed

warning: this `if` statement can be collapsed
  --> azalea/src/pathfinder/extras/process/mine_forever.rs:47:5
   |
47 | /     if !pathfinder.is_calculating {
48 | |         if !**items_to_pickup_change_acknowledged {
49 | |             should_force_recalculate_path = true;
50 | |             **items_to_pickup_change_acknowledged = true;
51 | |             println!("items_to_pickup_change_acknowledged = true");
52 | |         }
53 | |     }
   | |_____^
   |
   = 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
   |
47 ~     if !pathfinder.is_calculating && !**items_to_pickup_change_acknowledged {
48 +         should_force_recalculate_path = true;
49 +         **items_to_pickup_change_acknowledged = true;
50 +         println!("items_to_pickup_change_acknowledged = true");
51 +     }
   |

Check warning on line 414 in azalea-physics/src/collision/shape.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> azalea-physics/src/collision/shape.rs:414:47
    |
414 |                 binary_search(0, upper_limit, &|t| coord < self.get(axis, t as usize)) - 1
    |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `|t| coord < self.get(axis, t as usize)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
    = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default

Check warning on line 10 in azalea/build.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
  --> azalea/build.rs:10:18
   |
10 |         Ok(_) => return, // nightly
   |                  ^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
   = note: `#[warn(clippy::needless_return)]` on by default
help: replace `return` with a unit value
   |
10 |         Ok(_) => (), // nightly
   |                  ~~