Skip to content

more tidying

more tidying #143

GitHub Actions / clippy failed Jan 12, 2024 in 1s

clippy

1 error, 7 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 1
Warning 7
Note 0
Help 0

Versions

  • rustc 1.75.0 (82e1608df 2023-12-21)
  • cargo 1.75.0 (1d8b05cdd 2023-11-20)
  • clippy 0.1.75 (82e1608 2023-12-21)

Annotations

Check warning on line 30 in src/interop/hooks.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused `async` for function with no await statements

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

Check warning on line 9 in src/commands/ws/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused `async` for function with no await statements

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)]`

Check failure on line 12 in src/interop/hooks.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `clone` on type `Option<&Hook>` which implements the `Copy` trait

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)]`

Check warning on line 10 in src/interop/hooks.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

method `resolve_name` is never used

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 {
   |            ^^^^^^^^^^^^

Check warning on line 5 in src/commands/ws/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `run` is never used

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

Check warning on line 5 in src/commands/ws/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `app`

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`

Check warning on line 23 in src/interop/hooks.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `name`

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`

Check warning on line 22 in src/interop/hooks.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `data`

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