fix unwrap error on collision #50
Annotations
23 warnings
you are using an explicit closure for cloning elements:
azalea/src/swarm/mod.rs#L639
warning: you are using an explicit closure for cloning elements
--> azalea/src/swarm/mod.rs:639:25
|
639 | let proxy = self.proxies.choose(&mut thread_rng()).map(|p| p.clone());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `self.proxies.choose(&mut thread_rng()).cloned()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
= note: `#[warn(clippy::map_clone)]` on by default
|
usage of a legacy numeric constant:
azalea-client/src/task_pool.rs#L80
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,
| ~~~~~~~~~~
|
usage of a legacy numeric constant:
azalea-client/src/task_pool.rs#L61
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,
| ~~~~~~~~~~
|
assigning the result of `Clone::clone()` may be inefficient:
azalea-client/src/packet_handling/game.rs#L560
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
|
unused import: `azalea_protocol::packets::configuration::serverbound_resource_pack_packet::ServerboundResourcePackPacket`:
azalea-client/src/packet_handling/configuration.rs#L8
warning: unused import: `azalea_protocol::packets::configuration::serverbound_resource_pack_packet::ServerboundResourcePackPacket`
--> azalea-client/src/packet_handling/configuration.rs:8:5
|
8 | use azalea_protocol::packets::configuration::serverbound_resource_pack_packet::ServerboundResourcePackPacket;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
azalea-physics/src/collision/shape.rs#L326
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
azalea-physics/src/collision/shape.rs#L326
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
|
field `only_suffocating_blocks` is never read:
azalea-physics/src/collision/world_collisions.rs#L87
warning: field `only_suffocating_blocks` is never read
--> azalea-physics/src/collision/world_collisions.rs:87:9
|
82 | pub struct BlockCollisionsState<'a> {
| -------------------- field in this struct
...
87 | pub only_suffocating_blocks: bool,
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
manual implementation of `Option::map`:
azalea-protocol/src/connect.rs#L281
warning: manual implementation of `Option::map`
--> azalea-protocol/src/connect.rs:281:28
|
281 | let auth = match proxy.auth {
| ____________________________^
282 | | Some(user_key) => Some(user_key),
283 | | None => None,
284 | | };
| |_________________^ help: try: `proxy.auth.map(|user_key| user_key)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
= note: `#[warn(clippy::manual_map)]` on by default
|
this match expression is unnecessary:
azalea-protocol/src/connect.rs#L281
warning: this match expression is unnecessary
--> azalea-protocol/src/connect.rs:281:28
|
281 | let auth = match proxy.auth {
| ____________________________^
282 | | Some(user_key) => Some(user_key),
283 | | None => None,
284 | | };
| |_________________^ help: replace it with: `proxy.auth`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_match
= note: `#[warn(clippy::needless_match)]` on by default
|
unused import: `tracing::info`:
azalea-protocol/src/read.rs#L12
warning: unused import: `tracing::info`
--> azalea-protocol/src/read.rs:12:5
|
12 | use tracing::info;
| ^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
the item `syn` is imported redundantly:
azalea-protocol/azalea-protocol-macros/src/lib.rs#L4
warning: the item `syn` is imported redundantly
--> azalea-protocol/azalea-protocol-macros/src/lib.rs:4:5
|
4 | self, braced,
| ^^^^ the item `syn` is already defined by prelude
|
= note: `#[warn(unused_imports)]` on by default
|
the item `syn` is imported redundantly:
azalea-protocol/azalea-protocol-macros/src/lib.rs#L4
warning: the item `syn` is imported redundantly
--> azalea-protocol/azalea-protocol-macros/src/lib.rs:4:5
|
4 | self, braced,
| ^^^^ the item `syn` is already defined by prelude
|
= note: `#[warn(unused_imports)]` on by default
|
assigning the result of `Clone::clone()` may be inefficient:
azalea-brigadier/src/context/command_context_builder.rs#L83
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
|
assigning the result of `Clone::clone()` may be inefficient:
azalea-brigadier/src/context/command_context_builder.rs#L66
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
|
usage of a legacy numeric method:
azalea-buf/src/write.rs#L140
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);
| ~~~
|
usage of a legacy numeric method:
azalea-buf/src/write.rs#L44
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);
| ~~~
|
clippy_check
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3, actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
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/
|