diff options
| author | Sebastian Holmin <sebastian.holmin@mullvad.net> | 2025-02-10 11:13:38 +0100 |
|---|---|---|
| committer | Sebastian Holmin <sebastian.holmin@mullvad.net> | 2025-02-10 11:13:38 +0100 |
| commit | efad93944703b365032637112cca34e8d21e7f7a (patch) | |
| tree | 8442025b295978ef8cc1b8f55b5ddf1d1d6c1548 | |
| parent | a2c7e6cd50efa2d1d0d9b181ef50b282a1834336 (diff) | |
| download | mullvadvpn-efad93944703b365032637112cca34e8d21e7f7a.tar.xz mullvadvpn-efad93944703b365032637112cca34e8d21e7f7a.zip | |
Sort alphabetically as a fallback
Items are sorted by length, which is a hack that
happens to put important items first. Since
`Tunnel type` and `Bridge type` have the same
string lengths, they could be outputted randomly.
| -rw-r--r-- | mullvad-cli/src/format.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mullvad-cli/src/format.rs b/mullvad-cli/src/format.rs index ada97cbd5d..fdf105e51f 100644 --- a/mullvad-cli/src/format.rs +++ b/mullvad-cli/src/format.rs @@ -194,7 +194,7 @@ fn print_connection_info( for (name, value) in current_info .into_iter() // Hack that puts important items first, e.g. "Relay" - .sorted_by_key(|(name, _)| name.len()) + .sorted_by_key(|(name, _)| ( name.len(), name.to_owned() )) { let previous_value = previous_info.get(name).and_then(|i| i.clone()); match (value, previous_value) { |
