Skip to content

Commit ec02699

Browse files
committed
Bind mac_addr in match statement
1 parent 740f00d commit ec02699

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/mdns.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,14 @@ pub async fn discover(data: Arc<Mutex<SharedDevices>>) {
110110
}
111111

112112
// Look through paired devices for mac address
113-
match mac_addr {
113+
let mac_addr = match mac_addr {
114114
Some(m) => m,
115115
None => {
116116
warn!("Unable to get mac address for mDNS record");
117117
continue;
118118
}
119-
}
119+
};
120+
120121
let mut lock = data.lock().await;
121122
if let Ok(udid) = lock.get_udid_from_mac(mac_addr.to_string()).await {
122123
if lock.devices.contains_key(&udid) {

0 commit comments

Comments
 (0)