clippy
7 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 7 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.75.0-nightly (e20cb7702 2023-10-12)
- cargo 1.75.0-nightly (6fa6fdc76 2023-10-10)
- clippy 0.1.75 (e20cb77 2023-10-12)
Annotations
Check warning on line 25 in azalea/src/container.rs
github-actions / clippy
use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified
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`
|
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;
|
Check warning on line 85 in azalea/src/bot.rs
github-actions / clippy
use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified
warning: use of `async fn` in public traits is discouraged as auto trait bounds cannot be specified
--> azalea/src/bot.rs:85:5
|
85 | 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`
|
85 - async fn mine(&mut self, position: BlockPos);
85 + fn mine(&mut self, position: BlockPos) -> impl std::future::Future<Output = ()> + Send;
|
Check warning on line 113 in azalea-brigadier/src/suggestion/suggestions.rs
github-actions / clippy
using `clone` on type `StringRange` which implements the `Copy` trait
warning: using `clone` on type `StringRange` which implements the `Copy` trait
--> azalea-brigadier/src/suggestion/suggestions.rs:113:24
|
113 | range: range.clone(),
| ^^^^^^^^^^^^^ help: try removing the `clone` call: `range`
|
= 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 420 in azalea-brigadier/src/command_dispatcher.rs
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-brigadier/src/command_dispatcher.rs:420:50
|
420 | .filter(|child| child.read().can_use(&source))
| ^^^^^^^ help: change this to: `source`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 391 in azalea-brigadier/src/command_dispatcher.rs
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-brigadier/src/command_dispatcher.rs:391:26
|
391 | if !node.can_use(&source) {
| ^^^^^^^ help: change this to: `source`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 348 in azalea-brigadier/src/command_dispatcher.rs
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-brigadier/src/command_dispatcher.rs:348:21
|
348 | &source,
| ^^^^^^^ help: change this to: `source`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 326 in azalea-brigadier/src/command_dispatcher.rs
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-brigadier/src/command_dispatcher.rs:326:40
|
326 | if restricted && !node.can_use(&source) {
| ^^^^^^^ help: change this to: `source`
|
= 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