more tidying #143
Annotations
2 errors and 8 warnings
using `clone` on type `Option<&Hook>` which implements the `Copy` trait:
src/interop/hooks.rs#L12
error: using `clone` on type `Option<&Hook>` which implements the `Copy` trait
--> src/interop/hooks.rs:12:55
|
12 | .or(self.0.network.as_ref().and_then(|nw| nw.hooks.get(entry).clone()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `nw.hooks.get(entry)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
note: the lint level is defined here
--> src/main.rs:1:9
|
1 | #![deny(clippy::all)]
| ^^^^^^^^^^^
= note: `#[deny(clippy::clone_on_copy)]` implied by `#[deny(clippy::all)]`
|
clippy
Clippy had exited with the 101 exit code
|
unused `async` for function with no await statements:
src/interop/hooks.rs#L22
warning: unused `async` for function with no await statements
--> src/interop/hooks.rs:22:5
|
22 | / pub async fn event(&self, event: HookEvent, data: HashMap<String, String>) -> Result<()> {
23 | | for (name, hook) in &self.0.server.hooks {
24 | | if !hook.disabled && hook.when == event {
25 | | // execute?
... |
29 | | Ok(())
30 | | }
| |_____^
|
= help: consider removing the `async` from this function
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_async
|
unused `async` for function with no await statements:
src/commands/ws/mod.rs#L5
warning: unused `async` for function with no await statements
--> src/commands/ws/mod.rs:5:1
|
5 | / pub async fn run(mut app: App) -> Result<()> {
6 | |
7 | |
8 | | Ok(())
9 | | }
| |_^
|
= help: consider removing the `async` from this function
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_async
note: the lint level is defined here
--> src/main.rs:2:9
|
2 | #![warn(clippy::pedantic)]
| ^^^^^^^^^^^^^^^^
= note: `#[warn(clippy::unused_async)]` implied by `#[warn(clippy::pedantic)]`
|
method `resolve_name` is never used:
src/interop/hooks.rs#L10
warning: method `resolve_name` is never used
--> src/interop/hooks.rs:10:12
|
9 | impl<'a> HooksAPI<'a> {
| --------------------- method in this implementation
10 | pub fn resolve_name(&self, entry: &str) -> String {
| ^^^^^^^^^^^^
|
function `run` is never used:
src/commands/ws/mod.rs#L5
warning: function `run` is never used
--> src/commands/ws/mod.rs:5:14
|
5 | pub async fn run(mut app: App) -> Result<()> {
| ^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused variable: `app`:
src/commands/ws/mod.rs#L5
warning: unused variable: `app`
--> src/commands/ws/mod.rs:5:22
|
5 | pub async fn run(mut app: App) -> Result<()> {
| ^^^ help: if this is intentional, prefix it with an underscore: `_app`
|
unused variable: `name`:
src/interop/hooks.rs#L23
warning: unused variable: `name`
--> src/interop/hooks.rs:23:14
|
23 | for (name, hook) in &self.0.server.hooks {
| ^^^^ help: if this is intentional, prefix it with an underscore: `_name`
|
unused variable: `data`:
src/interop/hooks.rs#L22
warning: unused variable: `data`
--> src/interop/hooks.rs:22:49
|
22 | pub async fn event(&self, event: HookEvent, data: HashMap<String, String>) -> Result<()> {
| ^^^^ help: if this is intentional, prefix it with an underscore: `_data`
|
= note: `#[warn(unused_variables)]` on by default
|
clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: 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/
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
mcman-ubuntu-latest
Expired
|
8.2 MB |
|
mcman-windows-latest
Expired
|
9.6 MB |
|