mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-14 21:41:28 +03:00
fix clippy
This commit is contained in:
@@ -136,7 +136,7 @@ async fn do_capture(
|
|||||||
}
|
}
|
||||||
|
|
||||||
thread_local! {
|
thread_local! {
|
||||||
static PREV_LOG: Cell<Option<Instant>> = Cell::new(None);
|
static PREV_LOG: Cell<Option<Instant>> = const { Cell::new(None) };
|
||||||
}
|
}
|
||||||
|
|
||||||
/// debounce a statement `$st`, i.e. the statement is executed only if the
|
/// debounce a statement `$st`, i.e. the statement is executed only if the
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ async fn read_loop(
|
|||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
let mut b = [0u8; MAX_EVENT_SIZE];
|
let mut b = [0u8; MAX_EVENT_SIZE];
|
||||||
|
|
||||||
while let Ok(_) = conn.recv(&mut b).await {
|
while conn.recv(&mut b).await.is_ok() {
|
||||||
match b.try_into() {
|
match b.try_into() {
|
||||||
Ok(event) => dtls_tx
|
Ok(event) => dtls_tx
|
||||||
.send((event, conn.remote_addr().expect("no remote addr")))
|
.send((event, conn.remote_addr().expect("no remote addr")))
|
||||||
|
|||||||
Reference in New Issue
Block a user