Skip to content

fix edge case with reading FormattedText as nbt #1775

fix edge case with reading FormattedText as nbt

fix edge case with reading FormattedText as nbt #1775

GitHub Actions / clippy succeeded Apr 20, 2024 in 0s

clippy

11 warnings

Details

Results

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

Versions

  • rustc 1.79.0-nightly (f9b161492 2024-04-19)
  • cargo 1.79.0-nightly (6f06fe908 2024-04-16)
  • clippy 0.1.79 (f9b1614 2024-04-19)

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 109 in azalea/src/pathfinder/extras/process/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

assigning the result of `Clone::clone()` may be inefficient

warning: assigning the result of `Clone::clone()` may be inefficient
   --> azalea/src/pathfinder/extras/process/mod.rs:109:13
    |
109 |             last_items_to_pickup.items = items_to_pickup.items.clone();
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `last_items_to_pickup.items.clone_from(&items_to_pickup.items)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
    = note: `#[warn(clippy::assigning_clones)]` 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