Skip to content

item components are "implemented" meowmeowmeowmeowmeowmeowmeowmeowmeo… #1752

item components are "implemented" meowmeowmeowmeowmeowmeowmeowmeowmeo…

item components are "implemented" meowmeowmeowmeowmeowmeowmeowmeowmeo… #1752

GitHub Actions / clippy succeeded Apr 17, 2024 in 1s

clippy

16 warnings

Details

Results

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

Versions

  • rustc 1.79.0-nightly (1cec373f6 2024-04-16)
  • cargo 1.79.0-nightly (48eca1b16 2024-04-12)
  • clippy 0.1.79 (1cec373 2024-04-16)

Annotations

Check warning on line 80 in azalea-client/src/task_pool.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric constant

warning: usage of a legacy numeric constant
  --> azalea-client/src/task_pool.rs:80:30
   |
80 |                 max_threads: std::usize::MAX,
   |                              ^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
   |
80 |                 max_threads: usize::MAX,
   |                              ~~~~~~~~~~

Check warning on line 61 in azalea-client/src/task_pool.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric constant

warning: usage of a legacy numeric constant
  --> azalea-client/src/task_pool.rs:61:32
   |
61 |             max_total_threads: std::usize::MAX,
   |                                ^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
   = note: `#[warn(clippy::legacy_numeric_constants)]` on by default
help: use the associated constant instead
   |
61 |             max_total_threads: usize::MAX,
   |                                ~~~~~~~~~~

Check warning on line 560 in azalea-client/src/packet_handling/game.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-client/src/packet_handling/game.rs:560:29
    |
560 | ...                   info.display_name = updated_info.display_name.clone();
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `info.display_name.clone_from(&updated_info.display_name)`
    |
    = 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 255 in azalea-client/src/inventory.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`i32` -> `i32`)

warning: casting to the same type is unnecessary (`i32` -> `i32`)
   --> azalea-client/src/inventory.rs:255:44
    |
255 | ...                   || item_stack.count() as i32 >= self.quick_craft_slots.len() as i32
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `item_stack.count()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
    = note: `#[warn(clippy::unnecessary_cast)]` on by default

Check warning on line 326 in azalea-physics/src/collision/shape.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/collision/shape.rs:326:49
    |
326 |             IndexMerger::new_indirect(&coords1, &coords2, var3, var4)
    |                                                 ^^^^^^^^ help: change this to: `coords2`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 326 in azalea-physics/src/collision/shape.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/collision/shape.rs:326:39
    |
326 |             IndexMerger::new_indirect(&coords1, &coords2, var3, var4)
    |                                       ^^^^^^^^ help: change this to: `coords1`
    |
    = 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 83 in azalea-brigadier/src/context/command_context_builder.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-brigadier/src/context/command_context_builder.rs:83:9
   |
83 |         self.modifier = node.read().modifier.clone();
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `self.modifier.clone_from(&node.read().modifier)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

Check warning on line 66 in azalea-brigadier/src/context/command_context_builder.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-brigadier/src/context/command_context_builder.rs:66:9
   |
66 |         self.command = command.clone();
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `self.command.clone_from(command)`
   |
   = 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 250 in azalea-inventory/src/slot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `clone` on type `DataComponentKind` which implements the `Copy` trait

warning: using `clone` on type `DataComponentKind` which implements the `Copy` trait
   --> azalea-inventory/src/slot.rs:250:31
    |
250 |             components.insert(kind.clone(), component.as_ref().map(|c| (*c).clone()));
    |                               ^^^^^^^^^^^^ help: try dereferencing it: `*kind`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
    = note: `#[warn(clippy::clone_on_copy)]` on by default

Check warning on line 216 in azalea-inventory/src/slot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you seem to want to iterate on a map's values

warning: you seem to want to iterate on a map's values
   --> azalea-inventory/src/slot.rs:216:31
    |
216 |         for (_, component) in &self.components {
    |                               ^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map
    = note: `#[warn(clippy::for_kv_map)]` on by default
help: use the corresponding method
    |
216 |         for component in self.components.values() {
    |             ~~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~

Check warning on line 182 in azalea-inventory/src/slot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you seem to be trying to use `&Box<T>`. Consider using just `&T`

warning: you seem to be trying to use `&Box<T>`. Consider using just `&T`
   --> azalea-inventory/src/slot.rs:182:17
    |
182 |     ) -> Option<&Box<dyn components::EncodableDataComponent>> {
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dyn components::EncodableDataComponent`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box
    = note: `#[warn(clippy::borrowed_box)]` on by default

Check warning on line 151 in azalea-inventory/src/slot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`i32` -> `i32`)

warning: casting to the same type is unnecessary (`i32` -> `i32`)
   --> azalea-inventory/src/slot.rs:151:24
    |
151 |                 count: count as i32,
    |                        ^^^^^^^^^^^^ help: try: `count`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
    = note: `#[warn(clippy::unnecessary_cast)]` on by default

Check warning on line 31 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of `or_insert_with` to construct default value

warning: use of `or_insert_with` to construct default value
  --> azalea-core/src/registry_holder.rs:31:38
   |
31 |         let map = self.map.entry(id).or_insert_with(HashMap::new);
   |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
   = note: `#[warn(clippy::unwrap_or_default)]` on by default

Check warning on line 26 in azalea-registry/src/extra.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `impl` can be derived

warning: this `impl` can be derived
  --> azalea-registry/src/extra.rs:22:1
   |
22 | / impl Default for WolfVariant {
23 | |     fn default() -> Self {
24 | |         WolfVariant::Pale
25 | |     }
26 | | }
   | |_^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
   = note: `#[warn(clippy::derivable_impls)]` on by default
   = help: remove the manual implementation...
help: ...and instead derive it...
   |
8  + #[derive(Default)]
9  | registry! {
   |
help: ...and mark the default variant
   |
8  + #[default]
9  | registry! {
   |

Check warning on line 140 in azalea-buf/src/write.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric method

warning: usage of a legacy numeric method
   --> azalea-buf/src/write.rs:140:42
    |
140 |             value = (value >> 7) & (i64::max_value() >> 6);
    |                                          ^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
    |
140 |             value = (value >> 7) & (i64::MAX >> 6);
    |                                          ~~~

Check warning on line 44 in azalea-buf/src/write.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric method

warning: usage of a legacy numeric method
  --> azalea-buf/src/write.rs:44:42
   |
44 |             value = (value >> 7) & (i32::max_value() >> 6);
   |                                          ^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
   = note: `#[warn(clippy::legacy_numeric_constants)]` on by default
help: use the associated constant instead
   |
44 |             value = (value >> 7) & (i32::MAX >> 6);
   |                                          ~~~