decoder: clippy (div_ceil, if let), which CI's -D warnings refused
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDwfd6Ki8UfG4hK6W5YpJz
This commit is contained in:
+4
-6
@@ -284,12 +284,10 @@ fn main() -> ExitCode {
|
||||
loop {
|
||||
if sock.is_none() && last_open_try.elapsed() >= Duration::from_secs(2) {
|
||||
last_open_try = Instant::now();
|
||||
match socket::RxSocket::open(&iface, &ids, Duration::from_millis(100)) {
|
||||
Ok(s) => {
|
||||
eprintln!("decoder: {iface} open");
|
||||
sock = Some(s);
|
||||
}
|
||||
Err(_) => {} // absent or down: the state says so, retried every 2 s
|
||||
// Absent or down: the state says so, retried every 2 s.
|
||||
if let Ok(s) = socket::RxSocket::open(&iface, &ids, Duration::from_millis(100)) {
|
||||
eprintln!("decoder: {iface} open");
|
||||
sock = Some(s);
|
||||
}
|
||||
}
|
||||
match sock.as_ref().map(|s| s.recv()) {
|
||||
|
||||
Reference in New Issue
Block a user