mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-10-01 01:26:08 -04:00
Resolve cargo clippy
errors
Here was the error. ``` ❯ cargo clippy Checking veilid-tools v0.2.5 (~/Developer/veilid/veilid-tools) error: this `MutexGuard` is held across an `await` point --> veilid-tools/src/tests/common/test_host_interface.rs:269:17 | 269 | let mut tick = tick_1.lock(); | ^^^^^^^^ | = 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 --> veilid-tools/src/tests/common/test_host_interface.rs:271:25 | 271 | sleep(1000).await; | ^^^^^ ... 274 | sleep(1000).await; | ^^^^^ ... 277 | sleep(1000).await; | ^^^^^ ... 280 | sleep(1000).await; | ^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#await_holding_lock note: the lint level is defined here --> veilid-tools/src/lib.rs:23:9 | 23 | #![deny(clippy::all)] | ^^^^^^^^^^^ = note: `#[deny(clippy::await_holding_lock)]` implied by `#[deny(clippy::all)]` error: could not compile `veilid-tools` (lib) due to previous error ```
This commit is contained in:
parent
9f795ef520
commit
074ec50451
@ -259,6 +259,7 @@ pub async fn test_interval() {
|
||||
stopper.await;
|
||||
}
|
||||
|
||||
#[allow(clippy::await_holding_lock)]
|
||||
pub async fn test_timeout() {
|
||||
info!("testing timeout");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user