Skip to content

Commit

Permalink
Bind mac_addr in match statement
Browse files Browse the repository at this point in the history
  • Loading branch information
jkcoxson committed Feb 14, 2025
1 parent 740f00d commit ec02699
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/mdns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,14 @@ pub async fn discover(data: Arc<Mutex<SharedDevices>>) {
}

// Look through paired devices for mac address
match mac_addr {
let mac_addr = match mac_addr {
Some(m) => m,
None => {
warn!("Unable to get mac address for mDNS record");
continue;
}
}
};

let mut lock = data.lock().await;
if let Ok(udid) = lock.get_udid_from_mac(mac_addr.to_string()).await {
if lock.devices.contains_key(&udid) {
Expand Down

0 comments on commit ec02699

Please sign in to comment.