fix compile error in newer nightly versions #1794
Annotations
25 warnings
use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified:
azalea/src/container.rs#L25
warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified
--> azalea/src/container.rs:25:5
|
25 | async fn open_container(&mut self, pos: BlockPos) -> Option<ContainerHandle>;
| ^^^^^
|
= note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future`
help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change
|
25 - async fn open_container(&mut self, pos: BlockPos) -> Option<ContainerHandle>;
25 + fn open_container(&mut self, pos: BlockPos) -> impl std::future::Future<Output = Option<ContainerHandle>> + Send;
|
|
use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified:
azalea/src/bot.rs#L84
warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified
--> azalea/src/bot.rs:84:5
|
84 | async fn mine(&mut self, position: BlockPos);
| ^^^^^
|
= note: you can suppress this lint if you plan to use the trait only in your own code, or do not care about auto traits like `Send` on the `Future`
= note: `#[warn(async_fn_in_trait)]` on by default
help: you can alternatively desugar to a normal `fn` that returns `impl Future` and add any desired bounds such as `Send`, but these cannot be relaxed without a breaking API change
|
84 - async fn mine(&mut self, position: BlockPos);
84 + fn mine(&mut self, position: BlockPos) -> impl std::future::Future<Output = ()> + Send;
|
|
assigning the result of `ToOwned::to_owned()` may be inefficient:
azalea/src/pathfinder/mod.rs#L240
warning: assigning the result of `ToOwned::to_owned()` may be inefficient
--> azalea/src/pathfinder/mod.rs:240:17
|
240 | pathfinder.path = path.to_owned();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `path.clone_into(&mut pathfinder.path)`
|
= 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
|
field `f_score` is never read:
azalea/src/pathfinder/astar.rs#L162
warning: field `f_score` is never read
--> azalea/src/pathfinder/astar.rs:162:9
|
157 | pub struct Node<P, M> {
| ---- field in this struct
...
162 | pub f_score: f32,
| ^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
the feature `async_fn_in_trait` has been stable since 1.75.0 and no longer requires an attribute to enable:
azalea/src/lib.rs#L4
warning: the feature `async_fn_in_trait` has been stable since 1.75.0 and no longer requires an attribute to enable
--> azalea/src/lib.rs:4:12
|
4 | #![feature(async_fn_in_trait)]
| ^^^^^^^^^^^^^^^^^
|
= note: `#[warn(stable_features)]` 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.rs#L530
warning: assigning the result of `Clone::clone()` may be inefficient
--> azalea-client/src/packet_handling.rs:530:29
|
530 | ... 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
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
azalea-physics/src/collision/mergers.rs#L212
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> azalea-physics/src/collision/mergers.rs:212:12
|
212 | upper: &Vec<f64>,
| ^^^^^^^^^ help: change this to: `&[f64]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
azalea-physics/src/collision/mergers.rs#L211
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> azalea-physics/src/collision/mergers.rs:211:12
|
211 | lower: &Vec<f64>,
| ^^^^^^^^^ help: change this to: `&[f64]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
azalea-physics/src/collision/mergers.rs#L141
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> azalea-physics/src/collision/mergers.rs:141:48
|
141 | pub fn new_indirect(var1: &Vec<f64>, var2: &Vec<f64>, var3: bool, var4: bool) -> Self {
| ^^^^^^^^^ help: change this to: `&[f64]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
azalea-physics/src/collision/mergers.rs#L141
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> azalea-physics/src/collision/mergers.rs:141:31
|
141 | pub fn new_indirect(var1: &Vec<f64>, var2: &Vec<f64>, var3: bool, var4: bool) -> Self {
| ^^^^^^^^^ help: change this to: `&[f64]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `#[warn(clippy::ptr_arg)]` on by default
|
field `only_suffocating_blocks` is never read:
azalea-physics/src/collision/world_collisions.rs#L18
warning: field `only_suffocating_blocks` is never read
--> azalea-physics/src/collision/world_collisions.rs:18:9
|
13 | pub struct BlockCollisions<'a> {
| --------------- field in this struct
...
18 | pub only_suffocating_blocks: bool,
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` 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
|
accessing first element with `res.display_claims["xui"].get(0)`:
azalea-auth/src/auth.rs#L441
warning: accessing first element with `res.display_claims["xui"].get(0)`
--> azalea-auth/src/auth.rs:441:24
|
441 | user_hash: res.display_claims["xui"].get(0).unwrap()["uhs"].clone(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `res.display_claims["xui"].first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
= note: `#[warn(clippy::get_first)]` on by default
|
lint `clippy::vtable_address_comparisons` has been renamed to `ambiguous_wide_pointer_comparisons`:
azalea-brigadier/src/tree/mod.rs#L259
warning: lint `clippy::vtable_address_comparisons` has been renamed to `ambiguous_wide_pointer_comparisons`
--> azalea-brigadier/src/tree/mod.rs:259:25
|
259 | #[allow(clippy::vtable_address_comparisons)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `ambiguous_wide_pointer_comparisons`
|
= note: `#[warn(renamed_and_removed_lints)]` 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/
|