diff --git a/src/main.rs b/src/main.rs index b518ae4..79c26ed 100644 --- a/src/main.rs +++ b/src/main.rs @@ -126,18 +126,18 @@ async fn gpsd_client_loop( match msg { GpsdResponse::JsonResponse(_) => continue, GpsdResponse::NMEAResponse(mut n) => { - if let Some(msgs) = &msgs - && !msgs.contains(&n.id) - { - continue; + if let Some(msgs) = &msgs { + if !msgs.contains(&n.id) { + continue; + } }; if !chan.is_closed() { n.msg.push(b'\r'); n.msg.push(b'\n'); - if let Err(e) = chan.try_send(n.msg) - && !e.is_closed() - { - error!("Error sending to channel: {}", e) + if let Err(e) = chan.try_send(n.msg) { + if !e.is_closed() { + error!("Error sending to channel: {}", e) + } } } }