Skip to content

fix #52 and hotfix #51 #150

fix #52 and hotfix #51

fix #52 and hotfix #51 #150

GitHub Actions / clippy failed Jan 31, 2024 in 0s

clippy

4 errors, 5 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 4
Warning 5
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 35 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:27:5
   |
27 | /     pub async fn event(&self, event: HookEvent, _data: HashMap<String, String>) -> Result<()> {
28 | |         for (name, hook) in &self.0.server.hooks {
29 | |             if !hook.disabled && hook.when == event {
30 | |                 // execute?
...  |
34 | |         Ok(())
35 | |     }
   | |_____^
   |
   = 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 7 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(_app: App) -> Result<()> {
6 | |     Ok(())
7 | | }
  | |_^
  |
  = 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: `-W clippy::unused-async` implied by `-W clippy::pedantic`
  = help: to override `-W clippy::pedantic` add `#[allow(clippy::unused_async)]`

Check failure on line 268 in src/hot_reload/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `MutexGuard` is held across an `await` point

error: this `MutexGuard` is held across an `await` point
   --> src/hot_reload/mod.rs:268:33
    |
268 | ...                   let mut lock = state.lock().unwrap();
    |                           ^^^^^^^^
    |
    = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
note: these are all the `await` points this lock is held through
   --> src/hot_reload/mod.rs:271:61
    |
271 | ...                   tx.send(Command::WaitUntilExit).await?;
    |                                                       ^^^^^
272 | ...                   tx.send(Command::EndSession).await?;
    |                                                    ^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock

Check failure on line 253 in src/hot_reload/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `MutexGuard` is held across an `await` point

error: this `MutexGuard` is held across an `await` point
   --> src/hot_reload/mod.rs:253:33
    |
253 | ...                   let mut lock = state.lock().unwrap();
    |                           ^^^^^^^^
    |
    = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
note: these are all the `await` points this lock is held through
   --> src/hot_reload/mod.rs:261:33
    |
261 | ...                   ))).await?;
    |                           ^^^^^
262 | ...                   tx.send(Command::WaitUntilExit).await?;
    |                                                       ^^^^^
263 | ...                   tx.send(Command::EndSession).await?;
    |                                                    ^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock

Check failure on line 225 in src/hot_reload/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `MutexGuard` is held across an `await` point

error: this `MutexGuard` is held across an `await` point
   --> src/hot_reload/mod.rs:225:33
    |
225 | ...                   let mut lock = state.lock().unwrap();
    |                           ^^^^^^^^
    |
    = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
note: these are all the `await` points this lock is held through
   --> src/hot_reload/mod.rs:227:75
    |
227 | ...                   self.jar_name = Some(self.builder.build_all().await?);
    |                                                                     ^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock

Check failure on line 179 in src/hot_reload/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `MutexGuard` is held across an `await` point

error: this `MutexGuard` is held across an `await` point
   --> src/hot_reload/mod.rs:179:33
    |
179 | ...                   let mut lock = state.lock().unwrap();
    |                           ^^^^^^^^
    |
    = help: consider using an async-aware `Mutex` type or ensuring the `MutexGuard` is dropped before calling await
note: these are all the `await` points this lock is held through
   --> src/hot_reload/mod.rs:214:50
    |
182 |   ...                   let should_kill = tokio::select! {
    |  _________________________________________^
183 | | ...                       () = async {
184 | | ...                           // future to keep printing logs
185 | | ...                           loop {
...   |
210 | | ...                       },
211 | | ...                   };
    | |_______________________^
...
214 |   ...                       child.kill().await?;
    |                                          ^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock
    = note: `-D clippy::await-holding-lock` implied by `-D clippy::all`
    = help: to override `-D clippy::all` add `#[allow(clippy::await_holding_lock)]`
    = note: this error originates in the macro `$crate::select` which comes from the expansion of the macro `tokio::select` (in Nightly builds, run with -Z macro-backtrace for more info)

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(_app: App) -> Result<()> {
  |              ^^^
  |
  = note: `#[warn(dead_code)]` on by default

Check warning on line 28 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:28:14
   |
28 |         for (name, hook) in &self.0.server.hooks {
   |              ^^^^ help: if this is intentional, prefix it with an underscore: `_name`
   |
   = note: `#[warn(unused_variables)]` on by default