fix(network): reversed ordering of networks

This commit is contained in:
Cheong Lau 2025-10-07 20:52:31 +00:00 committed by GitHub
parent ce6b2a5b84
commit 7876fd1b36
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -116,10 +116,10 @@ impl std::cmp::Ord for ActiveConnectionInfo {
fn cmp(&self, other: &Self) -> std::cmp::Ordering { fn cmp(&self, other: &Self) -> std::cmp::Ordering {
match (self, other) { match (self, other) {
(Self::Vpn { .. }, Self::Wired { .. } | Self::WiFi { .. }) (Self::Vpn { .. }, Self::Wired { .. } | Self::WiFi { .. })
| (Self::Wired { .. }, Self::WiFi { .. }) => std::cmp::Ordering::Greater, | (Self::Wired { .. }, Self::WiFi { .. }) => std::cmp::Ordering::Less,
(Self::WiFi { .. }, Self::Wired { .. } | Self::Vpn { .. }) (Self::WiFi { .. }, Self::Wired { .. } | Self::Vpn { .. })
| (Self::Wired { .. }, Self::Vpn { .. }) => std::cmp::Ordering::Less, | (Self::Wired { .. }, Self::Vpn { .. }) => std::cmp::Ordering::Greater,
(Self::Vpn { name: n1, .. }, Self::Vpn { name: n2, .. }) (Self::Vpn { name: n1, .. }, Self::Vpn { name: n2, .. })
| (Self::Wired { name: n1, .. }, Self::Wired { name: n2, .. }) | (Self::Wired { name: n1, .. }, Self::Wired { name: n2, .. })