Skip to content

Commit

Permalink
feat: sort resolved entries by instance (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
hrzlgnm authored Apr 4, 2024
1 parent 5cae26e commit 83e2f97
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,13 @@ fn resolve_service(service_type: String, state: State<MdnsState>) -> Vec<Resolve
}
}

filter_resolved_service_by_interfaces_addresses(
let mut filtered = filter_resolved_service_by_interfaces_addresses(
result.values().cloned().collect(),
state.enabled_interfaces.lock().unwrap().clone(),
)
);
filtered.sort_by(|a, b| a.instance_name.cmp(&b.instance_name));

filtered
}

fn valid_ip_on_interface(addr: &IpAddr, interface: &Interface) -> bool {
Expand Down

0 comments on commit 83e2f97

Please sign in to comment.