fix clippy

This commit is contained in:
Ferdinand Schober
2024-09-10 11:06:17 +02:00
parent 89ab328fc9
commit 89a4672d36
2 changed files with 2 additions and 2 deletions

View File

@@ -136,7 +136,7 @@ async fn do_capture(
}
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

View File

@@ -119,7 +119,7 @@ async fn read_loop(
) -> Result<(), Error> {
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() {
Ok(event) => dtls_tx
.send((event, conn.remote_addr().expect("no remote addr")))